<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<![endif]-->
<title>VIM 中文帮助: Vim 4.6 和 5.x 版本的区别</title>
<link rel="stylesheet" href="vim-stylesheet.css" type="text/css" />
<link rel="canonical" href="https://yianwillis.github.io/vimcdoc/doc/version5.html" />
<script type="text/javascript" src="vimcdoc.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<nav id=banner>
<form action=tags.html target="tag_iframe">
  <input type="text" name="tag" id="tag" placeholder="标签搜索">
</form>
<iframe name="tag_iframe" src=""></iframe>
<a href="help.html">帮助总览</a> &middot;
<hr/>
<a href="quickref.html">快速参考</a> &middot;
<a href="index.html">命令索引</a> &middot;
<a href="eval.html#functions">函数列表</a> &middot;
<a href="quickref.html#option-list">选项列表</a> &middot;
<hr/>
<a href="usr_toc.html">用户手册</a> &middot;
<a href="help.html#reference_toc">参考手册</a> &middot;
</nav>

<header>
<h2>version5</h2>
</header>
<article id=outer>
<section class=inner>
<b class="vimtag"> <a name="version5.txt">version5.txt</a> </b>  适用于 Vim 9.0 版本。   最近更新: 2022年7月


                  <code class="vim">VIM 参考手册    by Bram Moolenaar</code>
                                <code class="vim">译者</code>: Willis

欢迎来到 Vim 5.0 版本！

本文档列出 Vim 4.x 和 Vim 5.0 的不同之处。尽管这里提到 5.0，但也适用于
5.1，5.2 版本等。
 <a href="vi_diff.html#vi_diff.txt">vi_diff.txt</a>  提供 Vi 和 Vim 5.0 的区别的一个概述。
 <a href="version4.html#version4.txt">version4.txt</a>  说明 Vim 3.0 和 Vim 4.0 的区别。

不 兼 容 点:                             <a href="version5.html#incompatible-5">incompatible-5</a> 

改变 <a href="options.html#'compatible'">'compatible'</a> 缺省值                 <a href="version5.html#cp-default">cp-default</a> 
改变文本排版命令 "Q"                     <a href="version5.html#Q-command-changed">Q-command-changed</a> 
改变命令行参数                           <a href="version5.html#cmdline-changed">cmdline-changed</a> 
保留自动命令                             <a href="version5.html#autocmds-kept">autocmds-kept</a> 
改变 <a href="options.html#'hidden'">'hidden'</a> 的使用                     <a href="version5.html#hidden-changed">hidden-changed</a> 
改变文本对象命令                         <a href="version5.html#text-objects-changed">text-objects-changed</a> 
删除 X-Windows 资源                      <a href="version5.html#x-resources">x-resources</a> 
$VIM 的使用                              <a href="version5.html#$VIM-use">$VIM-use</a> 
MS-DOS 和 Win32 的 $HOME 的使用          <a href="version5.html#$HOME-use">$HOME-use</a> 
改变标签文件格式                         <a href="version5.html#tags-file-changed">tags-file-changed</a> 
改变的选项                               <a href="version5.html#options-changed">options-changed</a> 
取消插入命令的 <code class="keystroke">CTRL-B</code>                    <a href="version5.html#i_CTRL-B-gone">i_CTRL-B-gone</a> 

新 特 性:                                <a href="version5.html#new-5">new-5</a> 

语法高亮                                 <a href="version5.html#new-highlighting">new-highlighting</a> 
内建的脚本语言                           <a href="version5.html#new-script">new-script</a> 
Perl 和 Python 支持                      <a href="version5.html#new-perl-python">new-perl-python</a> 
Win32 GUI 版本                           <a href="version5.html#added-win32-GUI">added-win32-GUI</a> 
VMS 版本                                 <a href="version5.html#added-VMS">added-VMS</a> 
BeOS 版本                                <a href="version5.html#added-BeOS">added-BeOS</a> 
Macintosh GUI 版本                       <a href="version5.html#added-Mac">added-Mac</a> 
和 Vi 更兼容                             <a href="version5.html#more-compatible">more-compatible</a> 
从标准输入读取输入                       <a href="version5.html#read-stdin">read-stdin</a> 
正则表达式模式                           <a href="version5.html#added-regexp">added-regexp</a> 
重载的标签                               <a href="version5.html#tag-overloaded">tag-overloaded</a> 
新命令                                   <a href="version5.html#new-commands">new-commands</a> 
新选项                                   <a href="version5.html#added-options">added-options</a> 
新命令行参数                             <a href="version5.html#added-cmdline-args">added-cmdline-args</a> 
其它新增                                 <a href="version5.html#added-various">added-various</a> 

改 进                                    <a href="version5.html#improvements-5">improvements-5</a> 

编 译 时 的 改 变                        <a href="version5.html#compile-changes-5">compile-changes-5</a> 

漏 洞 修 正                              <a href="version5.html#bug-fixes-5">bug-fixes-5</a> 

5.1 版 本                        <a href="version5.html#version-5.1">version-5.1</a> 
改动                                     <a href="version5.html#changed-5.1">changed-5.1</a> 
新增                                     <a href="version5.html#added-5.1">added-5.1</a> 
修正                                     <a href="version5.html#fixed-5.1">fixed-5.1</a> 

5.2 版 本                        <a href="version5.html#version-5.2">version-5.2</a> 
长行可编辑                               <a href="version5.html#long-lines">long-lines</a> 
加入文件浏览器                           <a href="version5.html#file-browser-5.2">file-browser-5.2</a> 
加入对话框                               <a href="version5.html#dialogs-added">dialogs-added</a> 
加入弹出式菜单                           <a href="version5.html#popup-menu-added">popup-menu-added</a> 
加入选择模式                             <a href="version5.html#new-Select-mode">new-Select-mode</a> 
加入会话文件                             <a href="version5.html#new-session-files">new-session-files</a> 
用户定义的函数和命令                     <a href="version5.html#new-user-defined">new-user-defined</a> 
新接口                                   <a href="version5.html#interfaces-5.2">interfaces-5.2</a> 
新移植版本                               <a href="version5.html#ports-5.2">ports-5.2</a> 
多字节支持                               <a href="version5.html#new-multi-byte">new-multi-byte</a> 
新函数                                   <a href="version5.html#new-functions-5.2">new-functions-5.2</a> 
新选项                                   <a href="version5.html#new-options-5.2">new-options-5.2</a> 
新 Ex 命令                               <a href="version5.html#new-ex-commands-5.2">new-ex-commands-5.2</a> 
改动                                     <a href="version5.html#changed-5.2">changed-5.2</a> 
新增                                     <a href="version5.html#added-5.2">added-5.2</a> 
修正                                     <a href="version5.html#fixed-5.2">fixed-5.2</a> 

5.3 版 本                        <a href="version5.html#version-5.3">version-5.3</a> 
改动                                     <a href="version5.html#changed-5.3">changed-5.3</a> 
新增                                     <a href="version5.html#added-5.3">added-5.3</a> 
修正                                     <a href="version5.html#fixed-5.3">fixed-5.3</a> 

5.4 版 本                        <a href="version5.html#version-5.4">version-5.4</a> 
引入运行时目录                           <a href="version5.html#new-runtime-dir">new-runtime-dir</a> 
引入文件类型                             <a href="version5.html#new-filetype-5.4">new-filetype-5.4</a> 
Vim 脚本续行符                           <a href="version5.html#new-line-continuation">new-line-continuation</a> 
改进会话文件                             <a href="version5.html#improved-sessions">improved-sessions</a> 
改进自动命令                             <a href="version5.html#improved-autocmds-5.4">improved-autocmds-5.4</a> 
加密                                     <a href="version5.html#new-encryption">new-encryption</a> 
GTK GUI 移植版本                         <a href="version5.html#new-GTK-GUI">new-GTK-GUI</a> 
菜单改变                                 <a href="version5.html#menu-changes-5.4">menu-changes-5.4</a> 
改进 Viminfo                             <a href="version5.html#improved-viminfo">improved-viminfo</a> 
若干新命令                               <a href="version5.html#new-commands-5.4">new-commands-5.4</a> 
若干新选项                               <a href="version5.html#new-options-5.4">new-options-5.4</a> 
Vim 脚本                                 <a href="version5.html#new-script-5.4">new-script-5.4</a> 
避免 hit-enter 提示                      <a href="version5.html#avoid-hit-enter">avoid-hit-enter</a> 
改进快速修复                             <a href="version5.html#improved-quickfix">improved-quickfix</a> 
正则表达式                               <a href="version5.html#regexp-changes-5.4">regexp-changes-5.4</a> 
改动                                     <a href="version5.html#changed-5.4">changed-5.4</a> 
新增                                     <a href="version5.html#added-5.4">added-5.4</a> 
修正                                     <a href="version5.html#fixed-5.4">fixed-5.4</a> 

5.5 版 本                        <a href="version5.html#version-5.5">version-5.5</a> 
改动                                     <a href="version5.html#changed-5.5">changed-5.5</a> 
新增                                     <a href="version5.html#added-5.5">added-5.5</a> 
修正                                     <a href="version5.html#fixed-5.5">fixed-5.5</a> 

5.6 版 本                        <a href="version5.html#version-5.6">version-5.6</a> 
改动                                     <a href="version5.html#changed-5.6">changed-5.6</a> 
新增                                     <a href="version5.html#added-5.6">added-5.6</a> 
修正                                     <a href="version5.html#fixed-5.6">fixed-5.6</a> 

5.7 版 本                        <a href="version5.html#version-5.7">version-5.7</a> 
改动                                     <a href="version5.html#changed-5.7">changed-5.7</a> 
新增                                     <a href="version5.html#added-5.7">added-5.7</a> 
修正                                     <a href="version5.html#fixed-5.7">fixed-5.7</a> 

5.8 版 本                        <a href="version5.html#version-5.8">version-5.8</a> 
改动                                     <a href="version5.html#changed-5.8">changed-5.8</a> 
新增                                     <a href="version5.html#added-5.8">added-5.8</a> 
修正                                     <a href="version5.html#fixed-5.8">fixed-5.8</a> 

(<code class="vim">译者注</code>: 各版本的修正一节，因内容过于琐碎，保留原文未翻译)

</section><hr class="doubleline" /><section class=inner>
<h4>                                 不 兼 容 点            <b class="vimtag"> <a name="incompatible-5">incompatible-5</a> </b></h4>
改变 <a href="options.html#'compatible'">'compatible'</a> 缺省值                                <b class="vimtag"> <a name="cp-default">cp-default</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 5.0 版本试图变得和 Vi 更兼容。这有助于那些使用 Vim 作为 Vi 短期代替品的
人，但导致了和 4.x 版本的部分不兼容。

4.x 版本里，<a href="options.html#'compatible'">'compatible'</a> 选项的缺省值是关闭的。现在缺省打开了。第一件事你就会
<code class="note">注意</code>到，"u" 命令撤销了它自己。其它的副作用包括映射可能工作方式不同，甚至完全不
工作。

因为许多从 4.x 切换到 5.0 的人觉得这很讨厌，如果 Vim 找到了 vimrc 文件，
<a href="options.html#'compatible'">'compatible'</a> 选项被关闭。这有点像魔术，但它确保 90% 的 Vim 用户不会因为这个改
变而受影响。

这意味什么呢？
- 如果你偏好运行在 <a href="options.html#'compatible'">'compatible'</a> 模式里且没有 vimrc 文件，你不需要做任何事。
- 如果你偏好运行在 <a href="options.html#'nocompatible'">'nocompatible'</a> 模式里且有 vimrc 文件，你不需要做任何事。
- 如果你偏好运行在 <a href="options.html#'compatible'">'compatible'</a> 模式里，但你有 vimrc 文件，你应该在 vimrc 文
  件先放上这行: 
<code class="example">        :set compatible</code>
- 如果你偏好运行在 <a href="options.html#'nocompatible'">'nocompatible'</a> 模式里，但你没有 vimrc 文件，你可以选择以下
  方法之一:
    - 建立空的 vimrc 文件 (比如: Unix 的 "~/.vimrc")。
    - 在你的 .exrc 文件或 $EXINIT 里放上这个命令: 
<code class="example">                :set nocompatible</code>
    - 以 "-N" 参数启动 Vim。

如果你是 Vi 和 Vim 的新用户，强烈建议使用 <a href="options.html#'nocompatible'">'nocompatible'</a>。因为 Vi 有很多意想不
到的副作用，这个设置可以避免。见 <a href="options.html#'compatible'">'compatible'</a>。

如果你喜欢 <a href="options.html#'compatible'">'compatible'</a> 的一些设置，不喜欢另一些，你可以用 <a href="options.html#'cpoptions'">'cpoptions'</a> 兼容性
选项微调。

如果用 "ex" 或 "gex" 启动 Vim，Vim 总是以兼容模式启动。


改变文本排版命令 "Q"                                    <b class="vimtag"> <a name="Q-command-changed">Q-command-changed</a> </b>
</section><hr class="singleline" /><section class=inner>

"Q" 命令以前使用 <a href="options.html#'textwidth'">'textwidth'</a> 选项指定的宽度对行进行排版。现在这个命令是 "gq"
(详情见  <a href="change.html#gq">gq</a> )。这个改变的原因是 "Q" 是个标准 Vi 的命令，用以进入 "Ex" 模式，而
事实上，Vim 现在有了 "Ex" 模式 (详情见  <a href="intro.html#Q">Q</a> )。

如果你仍然想用 "Q" 进行排版，使用此映射: 
<code class="example">        :noremap Q gq</code>
如果你同时想用 "Q" 的功能: 
<code class="example">        :noremap gQ Q</code>
<code class="example"></code>
<code class="example"></code>
改变命令行参数                                          <b class="vimtag"> <a name="cmdline-changed">cmdline-changed</a> </b>
</section><hr class="singleline" /><section class=inner>

现在可以混合命令行文件参数和选项参数。你可以在文件名之后给出选项。例如: 
<code class="example">   vim main.c -g</code>
<code class="example"></code>
这不能用来编辑 '-' 开始的文件。使用 "--" 参数  <a href="starting.html#---">---</a> ，然后: 
<code class="example">   vim -g -- -main.c</code>
<code class="example"></code>
"-v" 现在意味着启动 Ex 进入 Vi 模式，使用 "-R" 进入只读模式。
旧版: "vim -v file"      <a href="starting.html#-v">-v</a> 
新版: "vim -R file"      <a href="starting.html#-R">-R</a> 

"-e" 现在意味着启动 Vi 进入 Ex 模式，使用 "-q" 进入快速修复。
旧版: "vim -e errorfile"         <a href="starting.html#-e">-e</a> 
新版: "vim -q errorfile"  <a href="starting.html#-q">-q</a> 

Ex 模式里的 "-s" 现在意味着进入安静 (批处理) 模式。 <a href="starting.html#-s-ex">-s-ex</a> 

"-x" 为加密选项保留，使用 "-f" 来避免启动时进入新 CLI (Amiga)。
旧版: "vim -x file"      <a href="starting.html#-x">-x</a> 
新版: "vim -f file"      <a href="starting.html#-f">-f</a> 

Vim 允许有不超过十个的 "+cmd" 和 "-c cmd" 参数。过去，Vim 只执行最后一个。

"-n" 现在覆盖 vimrc 文件里 <a href="options.html#'updatecount'">'updatecount'</a> 的任何设置，但不会覆盖 gvimrc 文件的
设置。


保留自动命令                                            <b class="vimtag"> <a name="autocmds-kept">autocmds-kept</a> </b>
</section><hr class="singleline" /><section class=inner>

5.0 版本以前，有相同的事件、文件名模式和命令的自动命令只能出现一次。对简单的自
动命令这没有问题 (比如设置选项值)，但对更复杂的自动命令，相同的命令可能会出现
两次。这个限制导致了一些问题。因此，Vim 记住所有的自动命令，并以它们定义的顺序
保存。

- 在定义自动命令之前，删除任何可能已经定义过的自动命令。例如: 
<code class="example">        :au! * *.ext</code>
<code class="example">        :au BufEnter *.ext ...</code>
<code class="example"></code>
- 把自动命令放到 ":if" 命令里面。例如: 
<code class="example">        if !exists("did_ext_autocmds")</code>
<code class="example">          let did_ext_autocmds = 1</code>
<code class="example">          autocmd BufEnter *.ext ...</code>
<code class="example">        endif</code>
<code class="example"></code>
- 把自动命令放到不同的自动命令组里，这样你可以在定义之前删除它们  <a href="autocmd.html#:augroup">:augroup</a> : 
<code class="example">        augroup uncompress</code>
<code class="example">          au!</code>
<code class="example">          au BufReadPost *.gz ...</code>
<code class="example">        augroup END</code>
<code class="example"></code>
<code class="example"></code>
改变 <a href="options.html#'hidden'">'hidden'</a> 的使用                                    <b class="vimtag"> <a name="hidden-changed">hidden-changed</a> </b>
</section><hr class="singleline" /><section class=inner>

在 4.x 版本里，只有一些命令使用 <a href="options.html#'hidden'">'hidden'</a> 选项。现在任何缓冲区从窗口里消失的命
令都使用之。

以前，你可以只阿改变过的缓冲区里使用 ":buf xxx"，那个缓冲区就会隐藏。限制阿，
你必须置位 <a href="options.html#'hidden'">'hidden'</a> 选项来做此工作。

新的行为更简单: Vim 是否隐藏缓冲区不再取决于你使用的特定命令。
- 没有置位 <a href="options.html#'hidden'">'hidden'</a>，你永远不会得到隐藏的缓冲区。特例包括 ":hide" 和 ":close!"
  命令，还有，在罕见的情况下，当你不这么做就会丢失缓冲区里的改动的情况。
- 置位了 <a href="options.html#'hidden'">'hidden'</a>，你几乎不会卸载缓冲区。例外是 ":bunload" 或 ":bdel" 命令。

":buffer" 现在支持 "!": 放弃当前缓冲区的改动，":bnext"、":brewind" 等亦然。


改变文本对象命令                                        <b class="vimtag"> <a name="text-objects-changed">text-objects-changed</a> </b>
</section><hr class="singleline" /><section class=inner>

文本对象命令现在有了新的名字。这允许更多的文本对象，并且使这些字符可用于其它的
可视模式命令。因为不再提供单字符的名字，文本对象名字现在需要两个字符。第一个字
符总是 'i' 或 'a'。
<code class="section">        旧版    新版    </code>
        a       aw      一个单词                         <a href="motion.html#v_aw">v_aw</a> 
        A       aW      一个字串                         <a href="motion.html#v_aW">v_aW</a> 
        s       as      一个句子                         <a href="motion.html#v_as">v_as</a> 
        p       ap      一个段落                         <a href="motion.html#v_ap">v_ap</a> 
        S       ab      一个 () 块                       <a href="motion.html#v_ab">v_ab</a> 
        P       aB      一个 <code class="special">{}</code> 块                       <a href="motion.html#v_aB">v_aB</a> 

有另外一组文本对象，它们以 "i" 开始，代表 "inner" (内部)。它们选择相同的对象，
但排除空白。


删除 X-Windows 资源                                     <b class="vimtag"> <a name="x-resources">x-resources</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 不再支持下面的 X 资源:
- boldColor
- italicColor
- underlineColor
- cursorColor

Vim 现在使用高亮组设定颜色。这避免和使用粗体字体的混淆，其中隐含着使用特定颜
色。见  <a href="syntax.html#:highlight">:highlight</a>  和  <a href="gui_x11.html#gui-resources">gui-resources</a> 。


$VIM 的使用                                             <b class="vimtag"> <a name="$VIM-use">$VIM-use</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 现在使用 VIM 环境变量来找到所有的 Vim 系统文件。其中包括全局 vimrc、
gvimrc 和 menu.vim 文件以及所有的在线帮助和语法文件。见  <a href="starting.html#$VIM">$VIM</a> 。从 5.4
版本开始，也可以使用  <a href="starting.html#$VIMRUNTIME">$VIMRUNTIME</a> 。
Unix 上，Vim 在 "make install" 的时候设置 $VIM 的缺省值。
如果没有设置 $VIM，它的缺省值取自 <a href="options.html#'helpfile'">'helpfile'</a> 所在的目录，减去后面的
"/doc/help.txt"。


MS-DOS 和 Win32 的 $HOME 的使用                         <b class="vimtag"> <a name="$HOME-use">$HOME-use</a> </b>
</section><hr class="singleline" /><section class=inner>

MS-DOS 和 Win32 版本的 Vim 现在在搜索 vimrc 或 exrc 文件和读写 viminfo 文件的
时候，检查 $HOME。以前，Vim 在这些系统上使用 $VIM，但在有多个用户的系统上这会
有问题。现在 Vim 只有在 $HOME 没有设置或者在 $HOME 里没找到文件的时候才使用
$VIM。见  <a href="starting.html#_vimrc">_vimrc</a> 。


改变标签文件格式                                        <b class="vimtag"> <a name="tags-file-changed">tags-file-changed</a> </b>
</section><hr class="singleline" /><section class=inner>

标签文件里，只有制表可以用来分隔域。这样，文件名里就可以允许有空格，而且仍然和
Vi 兼容。以前的 Vim 版本里，任何的空白都可以用来分隔域。如果你的文件不使用单个
制表分隔域，编辑 tags 文件，并执行下面的命令: 
<code class="example">        :%s/\(\S*\)\s\+\(\S*\)\s\+\(.*\)/\1\t\2\t\3/</code>
<code class="example"></code>
<code class="example"></code>
改变的选项                                              <b class="vimtag"> <a name="options-changed">options-changed</a> </b>
</section><hr class="singleline" /><section class=inner>

<a href="options.html#'errorfile'">'errorfile'</a> 的缺省值从 "errors.vim" 改为 "errors.err"。原因是只有 Vim 脚本才应
该有 ".vim" 扩展名。

":make" 命令不在使用 <a href="options.html#'errorfile'">'errorfile'</a> 选项。这样避免了 ":make" 命令的输出覆盖手动保
存的错误文件。":make" 使用 <a href="options.html#'makeef'">'makeef'</a> 选项代替。它也可以产生唯一的名字，防止同时
运行的 ":make" 命令覆盖对方的文件。

<a href="options.html#'insertmode'">'insertmode'</a> 置位以后，更多的东西改变了:
- 普通模式里的 <code class="special">&lt;Esc&gt;</code> 进入插入模式。
- 插入模式里的 <code class="special">&lt;Esc&gt;</code> 不退出插入模式。
- 执行 ":set im" 时，立即进入插入模式。

<a href="options.html#'fileformat'">'fileformat'</a> (以前是 <a href="options.html#'textmode'">'textmode'</a> 选项) 和缓冲区的初始格式不同时，Vim 把缓冲区当
作已改变。

取消插入命令的 <code class="keystroke">CTRL-B</code>                                   <b class="vimtag"> <a name="i_CTRL-B-gone">i_CTRL-B-gone</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 编译时加入  <a href="various.html#+rightleft">+rightleft</a>  特性时，你可以使用 <code class="keystroke">CTRL-B</code> 切换 <a href="options.html#'revins'">'revins'</a> 选项。不幸
的是，有的人想按 <code class="keystroke">CTRL-V</code> 或者 <code class="keystroke">CTRL-N</code> 的时候不小心按了 'B' 键，然后不知道怎么撤
销此功能。因为切换 <a href="options.html#'revins'">'revins'</a> 选项可以很容易用下面的映射执行，<code class="keystroke">CTRL-B</code> 键的该功能
被取消了。为此目的，你仍然可用 <code class="keystroke">CTRL-_</code> 键  <a href="insert.html#i_CTRL-_">i_CTRL-_</a> 。 
<code class="example">   :imap &lt;C-B&gt; &lt;C-O&gt;:set revins!&lt;CR&gt;</code>

</section><hr class="doubleline" /><section class=inner>
<h4>                                 新 特 性               <b class="vimtag"> <a name="new-5">new-5</a> </b></h4>
语法高亮                                                <b class="vimtag"> <a name="new-highlighting">new-highlighting</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 现在有了非常灵活的为所有文件件类型设定高亮的方式。
见  <a href="syntax.html#syntax">syntax</a> 。一个小结: 
<code class="example">   :syntax on</code>
<code class="example"></code>
语法高亮可以设置色彩和属性，也可以用 <a href="options.html#'highlight'">'highlight'</a> 的 ':' 标志位为其它高亮项目设
置色彩和属性。所有的高亮项目被分配了一个高亮组，它指定这些项目的高亮方式。见
 <a href="syntax.html#:highlight">:highlight</a> 。缺省颜色也有改进。

你可以用 "Normal" 组来设定色彩终端的缺省前/背景色。对于 GUI，你同样可以使用该
铸来指定字体。

"2html.vim" 脚本可以用来把任何有语法高亮的文件转化为 HTML。其中的色彩和你在
Vim 看到的一模一样。使用 HTML 浏览器，你可以打印彩色的文件。


内建的脚本语言                                          <b class="vimtag"> <a name="new-script">new-script</a> </b>
</section><hr class="singleline" /><section class=inner>

一些附加的命令和表达式计算器是你可以编写简单但强大的脚本。命令包括 ":if" 和
":while"。表达式可以处理数值和字符串。你可以用 '=' 寄存器来直接插入表达式的结
果。见  <a href="eval.html#expression">expression</a> 。


Perl 和 Python 支持                                     <b class="vimtag"> <a name="new-perl-python">new-perl-python</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 可以用 ":perldo"、":perl" 等调用 Perl 命令。见  <a href="if_perl.html#perl">perl</a> 。
补丁由 Sven Verdoolaege 和 Matt Gerassimoff 提供。

Vim 可以用 ":python" 和 ":pyfile" 调用 Python 命令。见  <a href="if_pyth.html#python">python</a> 。

两者都必须在编译时打开才能得到。


Win32 GUI 版本                                          <b class="vimtag"> <a name="added-win32-GUI">added-win32-GUI</a> </b>
</section><hr class="singleline" /><section class=inner>

GUI 被移植到 MS-Windows 95 和 NT 上。Windows 用户现在可以使用 X11 GUI 的所有特
性了。 <a href="gui_w32.html#gui-w32">gui-w32</a> 
这也修正了在 Windows 95 里运行 Win32 控制台的问题，那里，控制台的支持总是很
差。
还有一个支持 OLE automation 接口的版本。 <a href="if_ole.html#if_ole.txt">if_ole.txt</a> 
使用 VisVim DLL，Vim 可以和 Microsoft Developer Studio 集成。
使用 Borland C++，可以产生 gvim 的 DLL 版本 (Aaron)。


VMS 版本                                                <b class="vimtag"> <a name="added-VMS">added-VMS</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 现在可以用于 VMS 系统。移植由 Henk Elbers 提供。
还没有充分测试。但应该可以用了。
对不起，没有文档。


BeOS 版本                                               <b class="vimtag"> <a name="added-BeOS">added-BeOS</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 可以用于 BeOS 系统上 (包括 BeBox)。(Olaf Seibert)
见  <a href="os_beos.html#os_beos.txt">os_beos.txt</a> 。


Macintosh GUI 版本                                      <b class="vimtag"> <a name="added-Mac">added-Mac</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 现在可以用于 Macintosh。(Dany St-Amant)
还没有充分测试，要小心！
见  <a href="os_mac.html#os_mac.txt">os_mac.txt</a> 。


和 Vi 更兼容                                            <b class="vimtag"> <a name="more-compatible">more-compatible</a> </b>
</section><hr class="singleline" /><section class=inner>

现在，有一个真正的 Ex 模式。以 "Q" 命令执行，或者启用可执行程序 "ex" 或
"gex"。 <a href="intro.html#Ex-mode">Ex-mode</a> 

如果 <a href="options.html#'cpoptions'">'cpoptions'</a> 里包含 'u' 标志位，即使在 Vi 兼容模式里，也允许多层撤销。
<code class="keystroke">CTRL-R</code> 用于重复撤销或重做 (像 Nvi 里的 ".")。


从标准输入读取输入                                      <b class="vimtag"> <a name="read-stdin">read-stdin</a> </b>
</section><hr class="singleline" /><section class=inner>

使用 "-" 命令行参数时，Vim 从标准输入读入文本输入。
这可以用来在管道的末端使用 Vim: 
<code class="example">   grep "^a.*" *.c | vim -</code>
见  <a href="starting.html#--">--</a> 。


正则表达式模式                                          <b class="vimtag"> <a name="added-regexp">added-regexp</a> </b>
</section><hr class="singleline" /><section class=inner>

增加了指定匹配原匹配次数的范围: "\<code class="special">{a,b}</code>"。       <a href="pattern.html#%2F\{">/\{</a> 
增加了 "最短匹配" 正则表达式 "\<code class="special">{-}</code>" (Webb)。
增加了 "\s"，匹配空白字符。可以替换 "[ \t]"。    <a href="pattern.html#%2F\s">/\s</a> 
增加了 "\S"，匹配非空白字符，可以替换 "[^ \t]"。 <a href="pattern.html#%2F\S">/\S</a> 


重载的标签                                              <b class="vimtag"> <a name="tag-overloaded">tag-overloaded</a> </b>
</section><hr class="singleline" /><section class=inner>

使用 C++ 这样的语言的时候，可能有多个标签对应相同的标签名。增加了命令，可以跳
转到任何一个重载的标签:
 <a href="tagsrch.html#:tselect">:tselect</a>       列出匹配的标签，并跳转到其中一个。
 <a href="tagsrch.html#:stselect">:stselect</a>      同上，并分割窗口。
 <a href="tagsrch.html#g_CTRL-]">g_CTRL-]</a>       使用光标所在的单词执行 ":tselect"。

        ":ta <code class="special">{tagname}</code>" 如有多个匹配，之后:
 <a href="tagsrch.html#:tnext">:tnext</a>         转到下一个匹配的标签。
 <a href="tagsrch.html#:tprevious">:tprevious</a>     转到前一个匹配的标签。
 <a href="tagsrch.html#:trewind">:trewind</a>       转到第一个匹配的标签。
 <a href="tagsrch.html#:tlast">:tlast</a>         转到最后一个匹配的标签。

":tag" 命令现在也接受通配符。执行命令行标签补全时，也可以 (在最后) 使用大小写
不敏感的匹配。


新命令                                                  <b class="vimtag"> <a name="new-commands">new-commands</a> </b>
</section><hr class="singleline" /><section class=inner>

 <a href="gui.html#:amenu">:amenu</a>         定义所有模式下的菜单，在插入模式里插入 <code class="keystroke">CTRL-O</code>，可视模式下
                ESC，命令行模式下 <code class="keystroke">CTRL-C</code>。"amenu" 用于定义缺省菜单和 Syntax 菜
                单。

 <a href="autocmd.html#:augroup">:augroup</a>       设置后面的自动命令使用的组。自动命令的编组允许了指定组内部的删
                除。

 <a href="quickfix.html#:crewind">:crewind</a>       转到第一个错误。
 <a href="quickfix.html#:clast">:clast</a>         转到最后一个错误，

 <a href="autocmd.html#:doautoall">:doautoall</a>     在所有载入的缓冲区里执行自动命令。

 <a href="eval.html#:echo">:echo</a>          回显表达式参数。可以用来显示包含变量的消息。

 <a href="eval.html#:execute">:execute</a>       执行表达式参数。可以用来构造任意的 Ex 命令。

 <a href="windows.html#:hide">:hide</a>          和 ":close" 类似。

 <a href="eval.html#:if">:if</a>            条件执行，用于内建脚本语言。

 <a href="starting.html#:intro">:intro</a>         显示介绍文字。Vim 启动式，如果没有文件参数，总是执行它。

 <a href="eval.html#:let">:let</a>           给内部变量赋值。

 <a href="map.html#:omap">:omap</a>          只给操作符等待模式定义映射。从而可以映射文本命令。

 <a href="various.html#:redir">:redir</a>         把消息的输出重定向到文件里。

 <a href="editing.html#:update">:update</a>        缓冲区改变时写回。

 <a href="eval.html#:while">:while</a>         While 循环，用于内建脚本语言。

可视模式:
 <a href="visual.html#v_O">v_O</a>            可视列块模式里的 "O" 水平移动光标到另一个角。
 <a href="change.html#v_D">v_D</a>            可视列块模式里的 "D" 删到行尾。

插入模式:
 <a href="insert.html#i_CTRL-]">i_CTRL-]</a>       切换缩写、无须插入任何字符。


新选项                                                  <b class="vimtag"> <a name="added-options">added-options</a> </b>
</section><hr class="singleline" /><section class=inner>

<a href="options.html#'background'">'background'</a>    用于选择缺省的高亮色。"syntax.vim" 也用于选择语法颜色。通常自
                动根据使用的终端自动设置。

<a href="options.html#'complete'">'complete'</a>      指定插入模式补全如何完成。

<a href="options.html#'eventignore'">'eventignore'</a>   可以暂时屏蔽自动命令。

<a href="options.html#'fileformat'">'fileformat'</a>    目前的文件格式。替换了 <a href="options.html#'textmode'">'textmode'</a>。
<a href="options.html#'fileformats'">'fileformats'</a>   目前的文件格式列表。替换了 <a href="options.html#'textauto'">'textauto'</a>。
                新的特点还包括对 Macintosh 格式的支持: 单个 <code class="special">&lt;CR&gt;</code> 分隔行。
                <a href="options.html#'fileformats'">'fileformats'</a> 在 MS-DOS、Win32 和 OS/2 的缺省是 "dos,unix"，即
                使 <a href="options.html#'compatible'">'compatible'</a> 置位也是如此。Unix 类型的文件在 <a href="options.html#'fileformats'">'fileformats'</a>
                为空的时候无论如何都无法工作。

<a href="options.html#'guicursor'">'guicursor'</a>     设置光标在不同模式里的形状和闪烁。缺省为插入和替换模式和等待操
                作符时调整光标。缺省也打开闪烁。

<a href="options.html#'fkmap'">'fkmap'</a>         波斯语键盘映射。

<a href="options.html#'hlsearch'">'hlsearch'</a>      高亮所有的最近使用的搜索模式的匹配。

<a href="options.html#'hkmapp'">'hkmapp'</a>        '根据读音的希伯来语' 映射 (Ilya Dogolazky)

<a href="options.html#'iconstring'">'iconstring'</a>    如果非空，定义图标名字。(5.2 版本: 按本义使用该字符串，可是用
                换行建立两行。)

<a href="options.html#'lazyredraw'">'lazyredraw'</a>    执行宏、寄存器或其它不靠输入的命令时，不重画屏幕。

<a href="options.html#'makeef'">'makeef'</a>        ":make" 使用的错误文件。"##" 被唯一的数字替换。可以避免两个
                Vim 会话覆盖彼此的错误文件的情况。Unix 的缺省是
                "/tmp/vim##.err"；Amiga 是 "t:vim##.Err"，其它 "vim##.err"。

<a href="options.html#'matchtime'">'matchtime'</a>     如果打开了 <a href="options.html#'showmatch'">'showmatch'</a>，1/10 秒计算的括号匹配显示的时间。类似
                于 Nvi。

<a href="options.html#'mousehide'">'mousehide'</a>     输入文本时隐藏鼠标指针。

<a href="options.html#'nrformats'">'nrformats'</a>     定义使用 <code class="keystroke">CTRL-A</code> 和 <code class="keystroke">CTRL-X</code> 命令时 Vim 考虑的数值的基底。缺省
                为: "hex,octal"。

<a href="options.html#'shellxquote'">'shellxquote'</a>   围绕整个外壳命令的附加引号，包括重定向。

<a href="options.html#'softtabstop'">'softtabstop'</a>   使得输入的感觉就像 tabstop 设为此值一样，而不用实际改变
                <a href="options.html#'tabstop'">'tabstop'</a> 的值。使得保持 <a href="options.html#'ts'">'ts'</a> 为 8 更简单，而实际上输入 <code class="special">&lt;Tab&gt;</code>
                仍然可以得到四个空格。

<a href="options.html#'titlestring'">'titlestring'</a>   如果非空，窗口标题字符串。(5.2 版本: 按本义使用该字符串，可是
                用换行建立两行。)

<a href="options.html#'verbose'">'verbose'</a>       详细程度。可以用来显示初始化时使用了哪个 .vimrc、.exrc、
                .viminfo 文件等等。也可以显示执行中的自动命令。也可以用 "-V"
                命令行参数设置。


新命令行参数                                            <b class="vimtag"> <a name="added-cmdline-args">added-cmdline-args</a> </b>
</section><hr class="singleline" /><section class=inner>

 <a href="starting.html#-U">-U</a>             指定要用的 gvimrc 文件。类似于指定 vimrc 的 "-u"。

 <a href="starting.html#-V">-V</a>             设置 <a href="options.html#'verbose'">'verbose'</a> 选项。比如 "vim -V10"。

 <a href="starting.html#-N">-N</a>             以非兼容模式启动。

 <a href="starting.html#-C">-C</a>             以兼容模式启动。

 <a href="starting.html#-Z">-Z</a>             以受限模式启动，禁止外壳命令。也可以用执行可执行程序 "rvim" 完
                成。

 <a href="starting.html#-h">-h</a>             显示使用信息并退出。


其它新增                                                <b class="vimtag"> <a name="added-various">added-various</a> </b>
</section><hr class="singleline" /><section class=inner>

增加了和 SNiFF+ 连接的功能 (Toni Leherbauer 提交)。Vim 可以用做 SNiFF 的编辑
器。没有文档...

要产生漏洞报告，可用包含的 bugreport.vim 脚本。
可以这样使用: ":so $VIMRUNTIME/bugreport.vim"，它在当前目录建立文件
"bugreport.txt"。 <a href="intro.html#bugs">bugs</a> 

":normal" 命令增加了范围。现在你可以为某范围内的每行重复相同的命令。
 <a href="various.html#:normal-range">:normal-range</a> 

加入了波斯语的支持 (Shiran)。只有在编译时打开才能使用。见  <a href="farsi.html#farsi">farsi</a> 。

</section><hr class="doubleline" /><section class=inner>
<h4>                                 改 进                  <b class="vimtag"> <a name="improvements-5">improvements-5</a> </b></h4>
性能:
- 如果设置了 <a href="options.html#'showcmd'">'showcmd'</a>，映射的执行过去会慢的多，因为需要频繁刷新输出。这对你执
  行 "至关重要的" 宏且需要置位 <a href="options.html#'showcmd'">'showcmd'</a> 时太有帮助了。
- 包含了关于标签文件进行二分法查找的补丁。(David O'Neill)
  可以通过复位 <a href="options.html#'tagbsearch'">'tagbsearch'</a> 选项关闭。
- 重复插入时，不更新标尺 (会显著减慢)。
- Unix 上，文件名扩展现在在内部完成了，不用启动外壳来处理。
- 用 expand_env() 扩展环境变量，而不用调用外壳。使得
  ":so $VIMRUNTIME/syntax/syntax.vim" 快的 <code class="emphasis">多</code> 了。
- 减少了光标定位的输出: 用 CR-LF 移动到下面数行的前面数列。使用 termios 时，不
  输出 CR 两次。
- 优化了光标定位。用 CR、BS 和 NL，如果产生的代码比光标绝对定位要短的话。
- 重复插入 "1000ii<code class="special">&lt;Esc&gt;</code>" 时，关闭重画。
- 使长行的 "d$" 或 "D" 快的多 (一次删除所有的字符，而不是一个一个删)。
- 用地一个字母访问选项表，而不是从头开始搜索。
- 使用 highlight_attr[]，而不是从 <a href="options.html#'highlight'">'highlight'</a> 字符串里搜索，这使设置特殊高亮属
  性快的多。
- 重画关闭时，不显示模式。
- 设置选项时，只有在需要的时候才重画屏幕。
- 通过第一个字母的查找表，提高 Ex 命令的性能。

选项:
<a href="options.html#'cinoptions'">'cinoptions'</a>    加入 'g' 标志位，用于 C++ 作用域定义。
<a href="options.html#'cpoptions'">'cpoptions'</a>     加入 'E' 标志位: 禁止抽出、删除等作用于空文本区域。缺省允许抽
                出空区域。如果包含 'E'，在空行上 "y$" 现在被处理为错误 (Vi 兼
                容)。
                加入 'j' 标志位: 连接只在 '.' 之后，而不是 '?' 或 '!' 之后加入
                两个空格。
                加入 'A' 标志位: 不给出 ATTENTION 消息。
                加入 'L' 标志位: 如果不给出并且置位了 <a href="options.html#'list'">'list'</a>，<a href="options.html#'textwidth'">'textwidth'</a> 排版
                如同没有置位 <a href="options.html#'list'">'list'</a> 那样。
                加入 'W' 标志位:  使 ":w!" 的行为类似 Vi: 不覆盖只读文件或者别
                人拥有的文件。
<a href="options.html#'highlight'">'highlight'</a>     加入 '@' 标志位，用于置位 <a href="options.html#'list'">'list'</a> 时，屏幕最后一行之后的 '@' 字
                符和行尾的 '$'。
                加入 'i' 标志位: 设置 <a href="options.html#'incsearch'">'incsearch'</a> 的高亮。缺省使用 "IncSearch"
                高亮组，它是 "Visual" 的链接。
                不再允许 <a href="options.html#'highlight'">'highlight'</a> 的 'h' 标志位 (3.0 之后就不再用了)。
<a href="options.html#'guifont'">'guifont'</a>       仅限于 Win32 GUI: 设置为 "*" 时弹出字体请求器。
<a href="options.html#'guipty'">'guipty'</a>        缺省多，因为太多人需要它了。
<a href="options.html#'path'">'path'</a>          可以包含通配符，"**" 可用于搜索整个树。
<a href="options.html#'shortmess'">'shortmess'</a>     加入 'I' 标志位已避免介绍文字。
<a href="options.html#'viminfo'">'viminfo'</a>       加入 '%' 标志位: 在 viminfo 文件里保存缓冲区列表。

- 提高了 <a href="options.html#'maxmem'">'maxmem'</a> 和 <a href="options.html#'maxmemtot'">'maxmemtot'</a> 在 Unix 和 Win32 上的缺省值。许多机器现在有更
  多的 RAM，因为价钱便宜多了。
- 实现了 ":set all&amp;"，设置所有选项为其缺省值。 <a href="options.html#:set">:set</a> 

交换文件:
- 不为只读文件建立交换文件。只有在第一次修改时，或在需要的内存太高的时候建立交
  换文件。 <a href="recover.html#swap-file">swap-file</a> 
- 如有可能，使得交换文件 "隐藏"。Unix 上是通过在交换文件前附加句号完成的。如果
  使用长文件名，DJGPP 和 Win32 版本也在前面附加句号，这样在编辑 Unix 文件系统
  上装载的文件时就有效果了。 <a href="recover.html#:swapname">:swapname</a>   MSDOS 上， <code class="emphasis">不</code> 隐藏文件属性，因为这会
  导致 share.exe 的问题。
- <a href="options.html#'updatecount'">'updatecount'</a> 缺省总是非零，即使在 Vi 兼容模式也是如此。
  这意味着总会有交换文件，它可以用来恢复。

标签:
- 包含了 ctags 2.0 (Darren Hiebert)。静态标签的语法从
        <code class="special">{tag}</code>:<code class="special">{fname}</code>   <code class="special">{fname}</code> <code class="special">{command}</code>
  改为
        <code class="special">{tag}</code>   <code class="special">{fname}</code> <code class="special">{command}</code>;"     file:
  这样，分析更快，更短，而且和 Vi 兼容。仍然接受旧的格式，除非在 src/feature.h
  里关闭 (见 OLD_STATIC_TAGS)。 <a href="tagsrch.html#tags-file-format">tags-file-format</a> 
- 标签的补全现在也包含了其它文件的静态标签，放在最后。
- 包含了 Stephen Riehm 的 "shtags"。
- 寻找标签匹配但文件不存在时，继续寻找下一个匹配。有助于为不同版本的源代码使用
  相同的标签文件 (通过链接)。
- 和其它文件的全局匹配相比，给当前文件的全局标签匹配更高优先级。

包含 xxd V1.8 版本 (Juergen Weigert)。

自动命令:
- VimLeave 自动命令再写入 viminfo 文件之后执行，而不是在它之前。 <a href="autocmd.html#VimLeave">VimLeave</a> 
- 允许在执行自动命令时修改之。可用于自修改的自动命令。(Goldberg 的想法)
- 使用两个或更多模式的自动命令时，不能把 ":if/:endif" 分到两行上。现在所有匹配
  的自动命令在一个 do_cmdline() 里执行。
- 自动命令不再改变 "." 重复的命令。
- 执行自动命令之后恢复搜索模式。则避免了自动命令弄乱了 <a href="options.html#'hlsearch'">'hlsearch'</a> 高亮。
- 试图执行自动命令时，同时尝试用短文件名匹配模式。有助于短文件名和长文件名不同
  的场合 (扩展后的符号链接)。 <a href="autocmd.html#autocmd-patterns">autocmd-patterns</a> 
- 使得 ":autocmd" 的输出更短且更好。
- ":autocmd" 在定义时扩展 <code class="special">&lt;sfile&gt;</code>。 <a href="cmdline.html#%3Csfile%3E">&lt;sfile&gt;</a> 
- ":autocmd" 加入 "nested" 标志位，允许嵌套。 <a href="autocmd.html#autocmd-nested">autocmd-nested</a> 
- ":autocmd" 加入 <code class="special">[group]</code> 参数。覆盖目前设置的组。 <a href="autocmd.html#autocmd-groups">autocmd-groups</a> 
- 新事件:
   <a href="autocmd.html#BufUnload">BufUnload</a>            缓冲区卸载前
   <a href="autocmd.html#BufDelete">BufDelete</a>            缓冲区从缓冲区列表删除前
   <a href="autocmd.html#FileChangedShell">FileChangedShell</a>     执行外壳命令后，文件修改时间被改变
   <a href="autocmd.html#User">User</a>                 用户定义的自动命令
- 如果 BufRead* 自动命令置位了 <a href="options.html#'modified'">'modified'</a>，过去在它之后又会复位。现在会记住
  ":set modified"。

GUI:
- 改进 GUI 滚动条在重画比产生滚动事件时的处理。
- "vim -u NONE" 现在也不再载入 .gvimrc 和其它 GUI 初始化设置。 <a href="starting.html#-u">-u</a> 
  用 "-U" 来使用别的 gvimrc 文件。 <a href="starting.html#-U">-U</a> 
- 处理外部命令的 <code class="keystroke">CTRL-C</code>，也包括支持 "setsid()" 的系统。
- 启动 GUI 时，限制窗口大小为屏幕大小。
- 缺省菜单从 $VIMRUNTIME/menu.vim 里读入。这使得缺省菜单可以定制。 <a href="gui.html#menu.vim">menu.vim</a> 
- 改进缺省菜单。加入 File/Print、Window 菜单、Syntax 菜单等等。
- 加入 ":menu" 命令的优先级。现在每个菜单可以放在你想要的地方，和菜单定义的顺
  序相互独立。 <a href="gui.html#menu-priority">menu-priority</a> 

在 Windows 95 上运行 Win32 控制台版本时，介绍文字屏幕给出<code class="note">警告</code>，因为在 Windows
95 上运行此版本会有问题。 <a href="os_win32.html#win32-problems">win32-problems</a> 

":substitute"  加入 'e' 标志位: 找不到匹配不会抱怨 (Campbell)。 <a href="change.html#:s">:s</a> 

映射中使用搜索命令时，只把最后一个保存进历史。避免过长的映射滥用历史。

检查启动模式时，忽略 "ex"、"view" 和 "gvim" 之后的所有字符。可用来使用 "gvim5"
等名字。 <a href="starting.html#gvim">gvim</a>  "gview" 启动只读模式的 GUI。 <a href="starting.html#gview">gview</a> 

调整窗口大小时，尽可能使光标的相对位置保持不变。(Webb)

":all" 和 ":ball" 不再为同一缓冲区关闭然后然后打开窗口。避免选项、跳转表和其它
信息的丢失。

现在如果 Vim 编译时不带 GUI，忽略 "-f" 命令行参数。 <a href="starting.html#-f">-f</a> 

可视列块模式里，鼠标右键选择最近的一角。

修改了 DOS 等的缺省映射。删除 DOS 专用的映射，用 Windows 的那些就可以了。加入
Shift-Insert、Ctrl-Insert、Ctrl-Del 和 Shift-Del。

修改 ":jumps" 输出的编号，使你能够看见 <code class="special">{count}</code> <code class="keystroke">CTRL-O</code> 到哪里。 <a href="motion.html#:jumps">:jumps</a> 

用 "~" 代替 $HOME 现在适用于所有系统。 <a href="options.html#$HOME">$HOME</a> 

Unix: 除了 <code class="keystroke">CTRL-C</code> 以外，也可用 tty 设置的 INTR 字符。有人把 INTR 设为 DEL。

允许 ":help" 命令参数里的 <code class="special">&lt;NL&gt;</code> 结束帮助命令，从而可以跟随下一个命令。

"   #if" 开头的行上按 "%" 过去不跳转到匹配的 "#else"。
<a href="options.html#'cpo'">'cpo'</a> 包含 '%' 时，'%' 不识别 "#if"、"#else" 等。 <a href="motion.html#%">%</a> 

改进了用 "<code class="keystroke">CTRL-N</code>"、"<code class="keystroke">CTRL-P</code>" 和 "<code class="keystroke">CTRL-X</code>" 的插入模式扩展  <a href="insert.html#ins-completion">ins-completion</a> :
- 加入 <a href="options.html#'complete'">'complete'</a> 选项。
- 置位 <a href="options.html#'nowrapscan'">'nowrapscan'</a> 而没有匹配时，错误信息里报告搜索的方向。
- 重复执行 <code class="keystroke">CTRL-X</code> 命令加入匹配之后的单词/行。
- 加入扩展时，接受单个字符的匹配。
- 重复的 <code class="keystroke">CTRL-X</code> <code class="keystroke">CTRL-N</code> 不把撤销断开，这样 "." 会重复整个插入过程。也修正了不能
  在用 <code class="keystroke">CTRL-N</code> 插入的单词上退格的问题。

插入模式用 <code class="keystroke">CTRL-E</code> 或 <code class="keystroke">CTRL-Y</code> 从上/下行复制字符时，不再使用 <a href="options.html#'textwidth'">'textwidth'</a>。
 <a href="insert.html#i_CTRL-E">i_CTRL-E</a> 

在参数表内移动的命令，如 ":n" 和 ":rew"，保持文件原有的光标位置。(主要为了和
Vi 兼容)。

Vim 现在记住每个缓冲区的 '&lt; 和 '&gt; 位置标记。修正了在一个缓冲区删除行后使另一缓
冲区的 '&lt; 和 '&gt; 位置标记非法的问题。 <a href="motion.html#'%3C">'&lt;</a> 

MSDOS、Unix 和 OS/2: 如果没有设置 $VIM，使用可执行文件的路径。用可执行文件路径
代替 $VIM 时如果存在 "src/"，删除之。编译后直接运行 Vim 时，这个方法使得 Vim
可以找到文档和语法文件。 <a href="starting.html#$VIM">$VIM</a> 

用 <code class="special">&lt;Esc&gt;</code> 退出可视模式时，光标位于可视区域开始处 (就像执行操作符之后的情况)。

Win32 和 Unix 版本: 删除外部命令的 1100 字符限制。

加入 ":edit +command" 参数包含空格的可能性。在它之前加上反斜杠。 <a href="editing.html#+cmd">+cmd</a> 

恢复后，提供 BufReadPost 自动命令。 <a href="recover.html#:recover">:recover</a> 

加入 "os2ansi"，OS/2 控制台，的色彩支持。(Slootman)

% 为空也能接受 "%:p:h"。 <a href="cmdline.html#:_%">:_%</a> 

包含 "<code class="special">&lt;sfile&gt;</code>": ":source" 命令的文件名。 <a href="cmdline.html#%3Csfile%3E">&lt;sfile&gt;</a> 

加入 "<code class="special">&lt;Bslash&gt;</code>" 特殊字符。有助于避免映射和菜单里的多重反斜杠。

帮助窗口里，双击跳转到光标所在的标签 (类似 <code class="keystroke">CTRL-]</code>)。

<code class="special">&lt;C-Left&gt;</code> 和 <code class="special">&lt;C-Right&gt;</code> 现在和 <code class="special">&lt;S-Left&gt;</code> 和 <code class="special">&lt;S-Right&gt;</code> 类似，正向/反向移动一个单词
(和 Windows 兼容)， <a href="motion.html#%3CC-Left%3E">&lt;C-Left&gt;</a> 

删除 .vimrc 文件对 ":version" 命令的需要。没有任何用处。用 ":if" 可以处理版本
间的差异。 <a href="various.html#:version">:version</a> 

MS-DOS、Win32 和 OS/2: 自动命令比较文件时，不区别路径分隔符 '/' 和 '\'。

新的 termcap 选项:
"mb": 闪烁。只能赋予其它高亮选项之一。 <a href="term.html#t_mb">t_mb</a> 
"bc": 退格字符。 <a href="term.html#t_bc">t_bc</a> 
"nd": GUI 上用于向右移动光标，避免删除从最后一个粗体字符开始的整行像素行。
       <a href="term.html#t_nd">t_nd</a> 
"xs": 对 hpterm 而言，高亮不用覆盖来删除。和 <a href="options.html#'weirdinvert'">'weirdinvert'</a> 组合使用。hpterm 现
      在可以用可视模式了。 <a href="term.html#t_xs">t_xs</a> 

Unix: 补丁和备份文件的时间设置为和原来文件相同的时间。(Hiebert)。

Amiga: 快速修复模式不再打开另一个窗口。现在可以用外壳命令。

加入 David Binette 的 decmouse 补丁。只要编译时打开。现在可以使用 Dec 和
Netterm 鼠标。

加入 '#' 寄存器: 轮换文件名  <a href="change.html#quote%23">quote#</a> 。":dis" 命令显示 '#' 寄存器。 <a href="change.html#:display">:display</a> 

Unix 上从 <a href="options.html#'isfname'">'isfname'</a> 的缺省值里删除 ':'。总是检查文件名里的 "://"。MS-DOS 也检
查 ":\\"。

"K"eyword 命令加入计数，如果 <a href="options.html#'keywordprg'">'keywordprg'</a> 为 "man"，计数插入 man 命令。"2K" 产
生 "!man 2 <code class="special">&lt;cword&gt;</code>"。 <a href="various.html#K">K</a> 

相对路径名上用 "gf" 删除文件名里的 "../"，和标签文件里对文件名的处理相同。 <a href="editing.html#gf">gf</a> 

结束纪录时，不把记录的寄存器设置为放置 (put) 用的缺省寄存器。

使用 "!!" 时，命令行上不放 ":5,5!"，而是 ":.!"。还有一些改进，可能的情况下把具
体的行号换成 "." 或 "$"。

MSDOS 等: $VIM/viminfo 换名为 $VIM/_viminfo。和下面这些更一致: .vimrc/_vimrc
和 .viminfo/_viminfo

文件名大小写不敏感的系统 (MSDOS、Amiga) 上，给文件名排序时忽略大小写。也包括缓
冲区的名字。

从标准输入读取如果失败，改为从标准错误读取 (可用于 "foo | xargs vim")。

32 位 MS-DOS 版本: 把 csdpmi3 改为 csdpmi4。

<code class="special">&lt;C-Left&gt;</code> 和 <code class="special">&lt;C-Right&gt;</code> 改为跳过字串 (WORD) 而不是单词 (word)。

Unix 之外的系统现在也支持覆盖文件时关于修改时间被改变的<code class="note">警告</code>。

Unix: 修改 configure 的缺省，使之和 Makefile 的缺省一致: 这包括 GUI、Perl 和
Python 等方面。

一些 Motif 的版本需要 "-lXpm"。configure 时加入这方面的检查。

link 行不加入 "-L/usr/lib"，一些系统可能有问题。

</section><hr class="doubleline" /><section class=inner>
<h4>                             编 译 时 的 改 变          <b class="vimtag"> <a name="compile-changes-5">compile-changes-5</a> </b></h4>
编译时，允许通过修改 src/feature.h 的一行，简单的选择 minimal、normal 还是
maximal 特性包。
DOS16 版本使用 minimal 特性包编译，以免内存太快溢出。
Win32、DJGPP 和 OS/2 版本使用 maximal 特性包，因为它们有足够的内存。
Amiga 可以有 normal 和 maximal 特性包的不同版本。

在 Unix 版本的 Makefile 里加上了 "make test"。允许快速检查是否多数 "普通" 命令
可以正确工作。也测试一些特定的命令。

DJGPP 版本里，加入 setlocale() 支持代码页。

autoconf:
- autoconf 增加 -lXdmcp 检查。
- 包含 -lXmu 的检查，为此不再需要编辑 Makefile。
- 切换到 autoconf 2.12。
- configure 增加对 &lt;poll.h&gt; 的检查。Linux 上包含 Perl 的时候看来需要？
- 现在，在 termcap 之前检查 termlib。
- configure 增加对 strncasecmp()、stricmp() 和 strnicmp() 检查。加入
  vim_stricmp()，如果没有 stricmp() 库函数的话。
- 在 configure 里使用 "datadir"，而不是我们自己对 HELPDIR 的检查。

从 Makefile.manx 里删除 "make proto"。没有很多的 #ifdef，无法使它工作。

从 proto.h 的 paths 里删除 "proto/"。Mac 移植版本需要如此。

Makefile.mint 进行了大改动。现在它包含 Unix Makefile。

Makefile.b32 加了 Dos16 的支持 (Makefile.b32 换名为 Makefile.bor)。

所有的源程序现在编辑时使用 tabstop 为 8 而不是 4，对于调试和其它工具的使用，这
样更合适。为了方便编辑。<a href="options.html#'softtabstop'">'softtabstop'</a> 设为 4。

Unix: 加入 "link.sh" 脚本，它从 link 命令里删除一些不必要的库。

缺省，HPUX 上不使用二合字母。除非定义了 HPUX_DIGRAPHS 才如此。
 <a href="digraph.html#digraphs-default">digraphs-default</a> 

</section><hr class="doubleline" /><section class=inner>
<h4>                                 漏 洞 修 正            <b class="vimtag"> <a name="bug-fixes-5">bug-fixes-5</a> </b></h4>
<code class="note">注意</code>:   这些修正有的只适用于 4.6 之后但在 5.0 之前的测试版。

When doing ":bdel", try going to the next loaded buffer.  Don't rewind to the
start of the buffer list.

mch_isdir() for Unix returned TRUE for "" on some systems.

Win32: <a href="options.html#'shell'">'shell'</a> set to "mksnt/sh.exe" breaks ":!" commands.  Don't use
backslashes in the temp file names.

On linux, with a FAT file system, could get spurious "file xxx changed since
editing started" messages, because the time is rounded off to two seconds
unexpectedly.

Crash in GUI, when selecting a word (double click) and then extend until an
empty line.

For systems where isdigit() can't handle characters &gt; 255, get_number() caused
a crash when moving the mouse during the prompt for recovery.

In Insert mode, "<code class="keystroke">CTRL-O</code> P" left the cursor on the last inserted character.
Now the cursor is left after the last putted character.

When quickfix found an error type other than 'e' or 'w', it was never printed.

A setting for <a href="options.html#'errorfile'">'errorfile'</a> in a .vimrc overruled the "-q errorfile" argument.

Some systems create a file when generating a temp file name.  Filtering would
then create a backup file for this, which was never deleted.  Now no backup
file is made when filtering.

simplify_filename() could remove a ".." after a link, resulting in the wrong
file name.  Made simplify_filename also work for MSDOS.  Don't use it for
Amiga, since it doesn't have "../".

otherfile() was unreliable when using links.  Could think that reading/writing
was for a different file, when it was the same.

Pasting with mouse in Replace mode didn't replace anything.

Window height computed wrong when resizing a window with an autocommand (could
cause a crash).

":s!foo!bar!" wasn't possible (Vi compatible).

do_bang() freed memory twice when called recursively, because of autocommands
(test11).  Thanks to Electric Fence!

"v$d" on an empty line didn't remove the "-- VISUAL --" mode message from the
command-line, and inverted the cursor.

":mkexrc" didn't check for failure to open the file, causing a crash.
(Felderhoff).

Win32 mch_write() wrote past fixed buffer, causing terminal keys no longer to
be recognized.  Both console and GUI version.

Athena GUI: Crash when removing a menu item.  Now Vim doesn't crash, but the
reversing of the menu item is still wrong.

Always reset <a href="options.html#'list'">'list'</a> option for the help window.

When <a href="options.html#'scrolloff'">'scrolloff'</a> is non-zero, a <a href="options.html#'showmatch'">'showmatch'</a> could cause the shown match to be
in the wrong line and the window to be scrolled (Acevedo).

After ":set all&amp;", <a href="options.html#'lines'">'lines'</a> and <a href="options.html#'ttytype'">'ttytype'</a> were still non-default, because the
defaults never got set.  Now the defaults for <a href="options.html#'lines'">'lines'</a> and <a href="options.html#'columns'">'columns'</a> are set
after detecting the window size. <a href="options.html#'term'">'term'</a> and <a href="options.html#'ttytype'">'ttytype'</a> defaults are set when
detecting the terminal type.

For (most) non-Unix systems, don't add file names with illegal characters when
expanding.  Fixes "cannot open swapfile" error when doing ":e *.burp", when
there is no match.

In X11 GUI, drawing part of the cursor obscured the text.  Now the text is
drawn over the cursor, like when it fills the block. (Seibert)

when started with "-c cmd -q errfile", the cursor would be left in line 1.
Now a ":cc" is done after executing "cmd".

":ilist" never ignored case, even when <a href="options.html#'ignorecase'">'ignorecase'</a> set.

"vim -r file" for a readonly file, then making a change, got ATTENTION message
in insert mode, display mixed up until <code class="special">&lt;Esc&gt;</code> typed.  Also don't give ATTENTION
message after recovering a file.

The abbreviation ":ab #i #include" could not be removed.

<code class="keystroke">CTRL-L</code> completion (longest common match) on command-line didn't work properly
for case-insensitive systems (MS-DOS, Windows, etc.).  (suggested by Richard
Kilgore).

For terminals that can hide the cursor ("vi" termcap entry), resizing the
window caused the cursor to disappear.

Using an invalid mark in an Ex address didn't abort the command.

When <a href="options.html#'smarttab'">'smarttab'</a> set, would use <a href="options.html#'shiftround'">'shiftround'</a> when inserting a TAB after a
space.  Now it always rounds to a tabstop.

Set '[ and '] marks for ":copy", ":move", ":append", ":insert", ":substitute"
and ":change".  (Acevedo).

"d$" in an empty line still caused an error, even when 'E' is not in
<a href="options.html#'cpoptions'">'cpoptions'</a>.

Help files were stored in the viminfo buffer list without a path.

GUI: Displaying cursor was not synchronized with other displaying.  Caused
several display errors.  For example, when the last two lines in the file
start with spaces, "dd" on the last line copied text to the (then) last line.

Win32: Needed to type <code class="keystroke">CTRL-SHIFT</code>-- to get <code class="keystroke">CTRL-_</code>.

GUI: Moving the cursor forwards over bold text would remove one column of bold
pixels.

X11 GUI: When a bold character in the last column was scrolled up or down, one
column of pixels would not be copied.

Using <code class="special">&lt;BS&gt;</code> to move the cursor left can sometimes erase a character.  Now use
"le" termcap entry for this.

Keyword completion with regexp didn't work.  e.g., for "b.*crat".

Fixed: With <code class="keystroke">CTRL-O</code> that jumps to another file, cursor could end up just after
the line.

Amiga: '$' was missing from character recognized as wildcards, causing $VIM
sometimes not to be expanded.

":change" didn't adjust marks for deleted lines.

":help <code class="special">[range]</code>" didn't work.  Also for <code class="special">[pattern]</code>, <code class="special">[count]</code> and <code class="special">[quotex]</code>.

For <a href="options.html#'cindent'">'cindent'</a>ing, typing "class::method" doesn't align like a label when the
second ':' is typed.
When inserting a CR with <a href="options.html#'cindent'">'cindent'</a> set (and a bunch of other conditions) the
cursor went to a wrong location.
<a href="options.html#'cindent'">'cindent'</a> was wrong for a line that ends in '}'.
<a href="options.html#'cindent'">'cindent'</a> was wrong after "else {".

While editing the cmdline in the GUI, could not use the mouse to select text
from the command-line itself.

When deleting lines, marks in tag stack were only adjusted for the current
window, not for other windows on the same buffer.

Tag guessing could find a function "some_func" instead of the "func" we were
looking for.

Tags file name relative to the current file didn't work.

":g/pat2/s//pat2/g", causing the number of subs to be reported, used to cause
a scroll up.  Now you no longer have to hit <code class="special">&lt;CR&gt;</code>.

X11 GUI: Selecting text could cause a crash.

32 bit DOS version: <code class="keystroke">CTRL-C</code> in external command killed Vim.  When SHELL is set
to "sh.exe", external commands didn't work.  Removed using of command.com, no
longer need to set <a href="options.html#'shellquote'">'shellquote'</a>.

Fixed crash when using ":g/pat/i".

Fixed (potential) crash for X11 GUI, when using an X selection.  Was giving a
pointer on the stack to a callback function, now it's static.

Using "#" and "*" with an operator didn't work.  E.g. "c#".

Command-line expansion didn't work properly after ":*". (Acevedo)

Setting <a href="options.html#'weirdinvert'">'weirdinvert'</a> caused highlighting to be wrong in the GUI.

":e +4 #" didn't work, because the "4" was in unallocated memory (could cause
a crash).

Cursor position was wrong for ":e #", after ":e #" failed, because of changes
to the buffer.

When doing ":buf N", going to a buffer that was edited with ":view", the
readonly flag was reset.  Now make a difference between ":e file" and ":buf
file": Only set/reset <a href="options.html#'ro'">'ro'</a> for the first one.

Avoid  <a href="message.html#hit-enter">hit-enter</a>  prompt when not able to write viminfo on exit.

When giving error messages in the terminal where the GUI was started, GUI
escape codes would be written to the terminal.  In an xterm this could be seen
as a '$' after the message.

Mouse would not work directly after ":gui", because full_screen isn't set,
which causes starttermcap() not to do its work.

<a href="options.html#'incsearch'">'incsearch'</a> did not scroll the window in the same way as the actual search.
When <a href="options.html#'nowrap'">'nowrap'</a> set, incsearch didn't show a match when it was off the side of
the screen.  Now it also shows the whole match, instead of just the cursor
position (if possible).

":unmap", ":unab" and ":unmenu" did not accept a double quote, it was seen as
the start of a comment.  Now it's Vi compatible.

Using <code class="special">&lt;Up&gt;</code><code class="special">&lt;Left&gt;</code><code class="special">&lt;Left&gt;</code><code class="special">&lt;Up&gt;</code> in the command-line, when there is no previous
cmdline in the history, inserted a NUL on the command-line.

"i<code class="special">&lt;Esc&gt;</code>" when on a <code class="special">&lt;Tab&gt;</code> in column 0 left the cursor in the wrong place.

GUI Motif: When adding a lot of menu items, the menu bar goes into two rows.
Deleting menu items, reducing the number of rows, now also works.

With ":g/pat/s//foo/c", a match in the first line was scrolled off of the
screen, so you could not see it.
When using ":s//c", with <a href="options.html#'nowrap'">'nowrap'</a> set, a match could be off the side of the
screen, so you could not see it.

When <a href="options.html#'helpfile'">'helpfile'</a> was set to a fixed, non-absolute path in feature.h, Vim would
crash.  mch_Fullname can now handle file names in read-only memory. (Lottem)

When using <code class="keystroke">CTRL-A</code> or <code class="keystroke">CTRL-@</code> in Insert mode, there could be strange effects
when using <code class="keystroke">CTRL-D</code> next.  Also, when repeating inserted text that included "0
<code class="keystroke">CTRL-D</code>" or "^ <code class="keystroke">CTRL-D</code>" this didn't work. (Acevedo)
Using <code class="keystroke">CTRL-D</code> after using <code class="keystroke">CTRL-E</code> or <code class="keystroke">CTRL-Y</code> in Insert mode that inserted a '0'
or '^', removed the '0' or '^' and more indent.

The command "2".p" caused the last inserted text to be executed as commands.
(Acevedo)

Repeating the insert of "<code class="keystroke">CTRL-V</code> 048" resulted in "^@" to be inserted.

Repeating Insert completion could fail if there are special characters in the
text. (Acevedo)

":normal /string<code class="special">&lt;CR&gt;</code>" caused the window to scroll.  Now all ":normal" commands
are executed without scrolling messages.

Redo of <code class="keystroke">CTRL-E</code> or <code class="keystroke">CTRL-Y</code> in Insert mode interpreted special characters as
commands.

Line wrapping for <a href="options.html#'tw'">'tw'</a> was done one character off for insert expansion
inserts.

buffer_exists() function didn't work properly for buffer names with a symbolic
link in them (e.g. when using buffer_exists(#)).

Removed the "MOTIF_COMMENT" construction from Makefile.  It now works with
FreeBSD make, and probably with NeXT make too.

Matching the <a href="options.html#'define'">'define'</a> and <a href="options.html#'include'">'include'</a> arguments now honor the settings for
<a href="options.html#'ignorecase'">'ignorecase'</a>. (Acevedo)

When one file shown in two windows, Visual selection mixed up cursor position
in current window and other window.

When doing ":e file" from a help file, the <a href="options.html#'isk'">'isk'</a> option wasn't reset properly,
because of a modeline in the help file.

When doing ":e!", a cursor in another window on the same buffer could become
invalid, leading to "ml_get: invalid lnum" errors.

Matching buffer name for when expanded name has a different path from not
expanded name (Brugnara).

Normal mappings didn't work after an operator.  For example, with ":map Q gq",
"QQ" didn't work.

When ":make" resulted in zero errors, a "No Errors" error message was given
(which breaks mappings).

When ":sourcing" a file, line length was limited to 1024 characters.  <code class="keystroke">CTRL-V</code>
before <code class="special">&lt;EOL&gt;</code> was not handled Vi compatible.  (Acevedo)

Unexpected exit for X11 GUI, caused by SAVE_YOURSELF event.  (Heimann)

<code class="keystroke">CTRL-X</code> <code class="keystroke">CTRL-I</code> only found one match per line. (Acevedo)
When using an illegal <code class="keystroke">CTRL-X</code> key in Insert mode, the <code class="keystroke">CTRL-X</code> mode message
was stuck.

Finally managed to ignore the "Quit" menu entry of the Window manager!  Now
Vim only exists when there are no changed buffers.

Trying to start the GUI when $DISPLAY is not set resulted in a crash.
When $DISPLAY is not set and gvim starts vim, title was restored to "Thanks
for flying Vim".
When $DISPLAY not set, starting "gvim" (dropping back to vim) and then
selecting text with the mouse caused a crash.

"J", with <a href="options.html#'joinspaces'">'joinspaces'</a> set, on a line ending in ". ", caused one space too
many to be added.  (Acevedo)

In insert mode, a <code class="keystroke">CTRL-R</code> <code class="special">{regname}</code> which didn't insert anything left the '"'
on the screen.

":z10" didn't work. (Clapp)

"Help "*" didn't work.

Renamed a lot of functions, to avoid clashes with POSIX name space.

When adding characters to a line, making it wrap, the following lines were
sometimes not shifted down (e.g. after a tag jump).

<code class="keystroke">CTRL-E</code>, with <a href="options.html#'so'">'so'</a> set and cursor on last line, now does not move cursor as
long as the last line is on the screen.

When there are two windows, doing "^W+^W-" in the bottom window could cause
the status line to be doubled (not redrawn correctly).

This command would hang: ":n  <code class="badlink">cat</code> ".  Now connect stdin of the external
command to /dev/null, when expanding.

Fixed lalloc(0,) error for ":echo %:e:r".  (Acevedo)

The "+command" argument to ":split" didn't work when there was no file name.

When selecting text in the GUI, which is the output of a command-line command
or an external command, the inversion would sometimes remain.

GUI: "-mh 70" argument was broken.  Now, when menuheight is specified, it is
not changed anymore.

GUI: When using the scrollbar or mouse while executing an external command,
this caused garbage characters.

Showmatch sometimes jumped to the wrong position.  Was caused by a call to
findmatch() when redrawing the display (when syntax highlighting is on).

Search pattern "\(a *\)\<code class="special">{3}</code> did not work correctly, also matched "a a".
Problem with brace_count not being decremented.

Wildcard expansion added too many non-matching file names.

When <a href="options.html#'iskeyword'">'iskeyword'</a> contains characters like '~', "*" and "#" didn't work
properly. (Acevedo)

On Linux, on a FAT file system, modification time can change by one second.
Avoid a "file has changed" warning for a one second difference.

When using the page-switching in an xterm, Vim would position the cursor on
the last line of the window on exit.  Also removed the cursor positioning for
":!" commands.

":g/pat/p" command (partly) overwrote the command.  Now the output is on a
separate line.

With <a href="options.html#'ic'">'ic'</a> and <a href="options.html#'scs'">'scs'</a> set, a search for "Keyword", ignore-case matches were
highlighted too.

"^" on a line with only white space, put cursor beyond the end of the line.

When deleting characters before where insertion started (<a href="options.html#'bs'">'bs'</a> == 2), could not
use abbreviations.

<code class="keystroke">CTRL-E</code> at end of file puts cursor below the file, in Visual mode, when <a href="options.html#'so'">'so'</a> is
non-zero.  <code class="keystroke">CTRL-E</code> didn't work when <a href="options.html#'so'">'so'</a> is big and the line below the window
wraps.  <code class="keystroke">CTRL-E</code>, when <a href="options.html#'so'">'so'</a> is non-zero, at end of the file, caused jumping
up-down.

":retab" didn't work well when <a href="options.html#'list'">'list'</a> is set.

Amiga: When inserting characters at the last line on the screen, causing it
to wrap, messed up the display.  It appears that a '\n' on the last line
doesn't always cause a scroll up.

In Insert mode "0<code class="special">&lt;C-D&gt;</code><code class="special">&lt;C-D&gt;</code>" deleted an extra character, because Vim thought
that the "0" was still there. (Acevedo)

"z<code class="special">{count}</code>l" ignored the count.  Also for "zh" et. al. (Acevedo)

"S" when <a href="options.html#'autoindent'">'autoindent'</a> is off didn't delete leading white space.

"/<code class="special">&lt;Tab&gt;</code>" landed on the wrong character when <a href="options.html#'incsearch'">'incsearch'</a> is set.

Asking a yes/no question could cause a  <a href="message.html#hit-enter">hit-enter</a>  prompt.

When the file consists of one long line (&gt;4100 characters), making changes
caused various errors and a crash.

DJGPP version could not save long lines (&gt;64000) for undo.

"yw" on the last char in the file didn't work.  Also fixed "6x" at the end of
the line. "6X" at the start of a line fails, but does not break a mapping.  In
general, a movement for an operator doesn't beep or flush a mapping, but when
there is nothing to operate on it beeps (this is Vi compatible).

"m'" and "m`" now set the '' mark at the cursor position.

Unix: Resetting of signals for external program didn't work, because SIG_DFL
and NULL are the same!  For "!!yes|dd count=1|, the yes command kept on
running.

Partly fixed: Unix GUI: Typeahead while executing an external command was lost.
Now it's not lost while the command is producing output.

Typing <code class="special">&lt;S-Tab&gt;</code> in Insert mode, when it isn't mapped, inserted "<code class="special">&lt;S-Tab&gt;</code>".  Now
it works like a normal <code class="special">&lt;Tab&gt;</code>, just like <code class="special">&lt;C-Tab&gt;</code> and <code class="special">&lt;M-Tab&gt;</code>.

Redrawing ruler didn't check for old value correctly (caused UMR warnings in
Purify).

Negative array index in finish_viminfo_history().

":g/^/d|mo $" deleted all the lines.  The ":move" command now removes the
:global mark from the moved lines.

Using "vG" while the last line in the window is a "@" line, didn't update
correctly.  Just the "v" showed "~" lines.

"daw" on the last char of the file, when it's a space, moved the cursor beyond
the end of the line.

When <a href="options.html#'hlsearch'">'hlsearch'</a> was set or reset, only the current buffer was redrawn, while
this affects all windows.

<code class="keystroke">CTRL-^</code>, positioning the cursor somewhere from 1/2 to 1 1/2 screen down the
file, put the cursor at the bottom of the window, instead of halfway.

When scrolling up for ":append" command, not all windows were updated
correctly.

When <a href="options.html#'hlsearch'">'hlsearch'</a> is set, and an auto-indent is highlighted, pressing <code class="special">&lt;Esc&gt;</code>
didn't remove the highlighting, although the indent was deleted.

When <a href="options.html#'ru'">'ru'</a> set and <a href="options.html#'nosc'">'nosc'</a>, using "$j" showed a wrong ruler.

Under Xfree 3.2, Shift-Tab didn't work (wrong keysym is used).

Mapping <code class="special">&lt;S-Tab&gt;</code> didn't work.  Changed the key translations to use the shortest
key code possible.  This makes the termcode translations and mappings more
consistent.  Now all modifiers work in all combinations, not only with <code class="special">&lt;Tab&gt;</code>,
but also with <code class="special">&lt;Space&gt;</code>, <code class="special">&lt;CR&gt;</code>, etc.

For Unix, restore three more signals.  And Vim catches SIGINT now, so <code class="keystroke">CTRL-C</code>
in Ex mode doesn't make Vim exit.

""a5Y" yanked 25 lines instead of 5.

"vrxxx<code class="special">&lt;Esc&gt;</code>" in an empty line could not be undone.

A <code class="keystroke">CTRL-C</code> that breaks ":make" caused the errorfile not to be read (annoying
when you want to handle what ":make" produced so far).

":0;/pat" didn't find "pat" in line 1.

Search for "/test/s+1" at first char of file gave bottom-top message, or
didn't work at all with <a href="options.html#'nowrapscan'">'nowrapscan'</a>.

Bug in viminfo history.  Could cause a crash on exit.

":print" didn't put cursor on first non-blank in line.

":0r !cat &lt;/dev/null" left cursor in line zero, with very strange effects.

With <a href="options.html#'showcmd'">'showcmd'</a> set and <a href="options.html#'timeoutlen'">'timeoutlen'</a> set to a few seconds, trick to position
the cursor leftwards didn't work.

AIX stty settings were restored to cs5 instead of cs8 (Winn).

File name completion didn't work for "zsh" versions that put spaces between
file names, instead of NULs.

Changed "XawChain*" to "XtChain*", should work for more systems.

Included quite a few fixes for rightleft mode (Lottem).

Didn't ask to  <a href="message.html#hit-enter">hit-enter</a>  when GUI is started and error messages are printed.

When trying to edit a file in a non-existent directory, ended up with editing
"No file".

"gqap" to format a paragraph did too much redrawing.

When <a href="options.html#'hlsearch'">'hlsearch'</a> set, only the current window was updated for a new search
pattern.

Sometimes error messages on startup didn't cause a  <a href="message.html#hit-enter">hit-enter</a>  prompt,
because of autocommands containing an empty line.

Was possible to select part of the window in the border, below the command
line.

'&lt; and '&gt; marks were not at the correct position after linewise Visual
selection.

When translating a help argument to "<code class="keystroke">CTRL-x</code>", prepend or append a '_', when
applicable.

Blockwise visual mode wasn't correct when moving vertically over a special
character (displayed as two screen characters).

Renamed "struct option" to "struct vimoption" to avoid name clash with GNU
getopt().

":abclear" didn't work (but ":iabclear" and ":cabclear" did work).

When <a href="options.html#'nowrap'">'nowrap'</a> used, screen wasn't always updated correctly.

"vim -c split file" displayed extra lines.

After starting the GUI, searched the termcap for a "gui" term.

When <a href="options.html#'hls'">'hls'</a> used, search for "^$" caused a hang.
When <a href="options.html#'hls'">'hls'</a> was set, an error in the last regexp caused trouble.

Unix: Only output an extra <code class="special">&lt;EOL&gt;</code> on exit when outputted something in the
alternate screen, or when there is a message that needs to be cleared.

"/a\{" did strange things, depending on previous search.

"c}" only redrew one line (with -u NONE).

For mappings, <code class="keystroke">CTRL-META</code>-A was shown as &lt;M-^A&gt; instead of <code class="special">&lt;MC-A&gt;</code>, while :map
only accepts <code class="special">&lt;MC-A&gt;</code>.  Now <code class="special">&lt;M-C-A&gt;</code> is shown.

Unix: When using full path name in a tags file, which contains a link, and
<a href="options.html#'hidden'">'hidden'</a> set and jumping to a tag in the current file, would get bogus
ATTENTION message.  Solved by always expanding file names, even when starting
with '/'.

<a href="options.html#'hlsearch'">'hlsearch'</a> highlighting of special characters (e.g., a TAB) didn't highlight
the whole thing.

"r<code class="special">&lt;CR&gt;</code>" didn't work correctly on the last char of a line.

Sometimes a window resize or other signal caused an endless loop, involving
set_winsize().

"vim -r" didn't work, it would just hang (using tgetent() while <a href="options.html#'term'">'term'</a> is
empty).

"gk" while <a href="options.html#'nowrap'">'nowrap'</a> set moved two lines up.

When windows are split, a message that causes a scroll-up messed up one of the
windows, which required a <code class="keystroke">CTRL-L</code> to be typed.

Possible endless loop when using shell command in the GUI.

Menus defined in the .vimrc were removed when GUI started.

Crash when pasting with the mouse in insert mode.

Crash with ":unmenu *" in .gvimrc for Athena.

"5&gt;&gt;" shifted 5 lines 5 times, instead of 1 time.

<code class="keystroke">CTRL-C</code> when getting a prompt in ":global" didn't interrupt.

When <a href="options.html#'so'">'so'</a> is non-zero, and moving the scrollbar completely to the bottom,
there was a lot of flashing.

GUI: Scrollbar ident must be long for DEC Alpha.

Some functions called vim_regcomp() without setting reg_magic, which could
lead to unpredictable magicness.

Crash when clicking around the status line, could get a selection with a
backwards range.

When deleting more than one line characterwise, the last character wasn't
deleted.

GUI: Status line could be overwritten when moving the scrollbar quickly (or
when <a href="options.html#'wd'">'wd'</a> is non-zero).

An ESC at the end of a ":normal" command caused a wait for a terminal code to
finish.  Now, a terminal code is not recognized when its start comes from a
mapping or ":normal" command.

Included patches from Robert Webb for GUI.  Layout of the windows is now done
inside Vim, instead of letting the layout manager do this.  Makes Vim work
with Lesstif!

UMR warning in set_expand_context().

Memory leak: b_winlnum list was never freed.

Removed TIOCLSET/TIOCLGET code from os_unix.c.  Was changing some of the
terminal settings, and looked like it wasn't doing anything good.  (suggested
by Juergen Weigert).

Ruler overwrote "is a directory" message.  When starting up, and <a href="options.html#'cmdheight'">'cmdheight'</a>
set to &gt; 1, first message could still be in the last line.

Removed prototype for putenv() from proto.h, it's already in osdef2.h.in.

In replace mode, when moving the cursor and then backspacing, wrong characters
were inserted.

Win32 GUI was checking for a <code class="keystroke">CTRL-C</code> too often, making it slow.

Removed mappings for MS-DOS that were already covered by commands.

When visually selecting all lines in a file, cursor at last line, then "J".
Gave ml_get errors.  Was a problem with scrolling down during redrawing.

When doing a linewise operator, and then an operator with a mouse click, it
was also linewise, instead of characterwise.

When <a href="options.html#'list'">'list'</a> is set, the column of the ruler was wrong.

Spurious error message for "/\(b\+\)*".

When visually selected many lines, message from ":w file" disappeared when
redrawing the screen.

":set <code class="special">&lt;M-b&gt;</code>=^[b", then insert "^[b", waited for another character.  And then
inserted "<code class="special">&lt;M-b&gt;</code>" instead of the real <code class="special">&lt;M-b&gt;</code> character.  Was trying to insert
K_SPECIAL x NUL.

<code class="keystroke">CTRL-W</code> ] didn't use count to set window height.

GUI: "-font" command-line argument didn't override <a href="options.html#'guifont'">'guifont'</a> setting from
.gvimrc. (Acevedo)

GUI: clipboard wasn't used for "*y".  And some more Win32/X11 differences
fixed for the clipboard (Webb).

Jumping from one help file to another help file, with <a href="options.html#'compatible'">'compatible'</a> set,
removed the <code class="badlink">'help'</code> flag from the buffer.

File-writable bit could be reset when using ":w!" for a readonly file.

There was a wait for <code class="keystroke">CTRL-O</code> n in Insert mode, because the search pattern was
shown.
Reduced wait, to allow reading a message, from 10 to 3 seconds.  It seemed
nothing was happening.

":recover" found same swap file twice.

GUI: "*yy only worked the second time (when pasting to an xterm)."

DJGPP version (dos32): The system flags were cleared.

Dos32 version: Underscores were sometimes replaced with y-umlaut (Levin).

Version 4.1 of ncurses can't handle tputs("", ..).  Avoid calling tputs() with
an empty string.

<code class="special">&lt;S-Tab&gt;</code> in the command-line worked like <code class="keystroke">CTRL-P</code> when no completion started yet.
Now it does completion, last match first.

Unix: Could get annoying "can't write viminfo" message after doing "su".  Now
the viminfo file is overwritten, and the user set back to the original one.

":set term=builtin_gui" started the GUI in a wrong way.  Now it's not
allowed anymore.  But "vim -T gui" does start the GUI correctly now.

GUI: Triple click after a line only put last char in selection, when it is a
single character word.

When the window is bigger than the screen, the scrolling up of messages was
wrong (e.g. ":vers", ":hi").  Also when the bottom part of the window was
obscured by another window.

When using a wrong option only an error message is printed, to avoid that the
usage information makes it scroll off the screen.

When exiting because of not being able to read from stdin, didn't preserve the
swap files properly.

Visual selecting all chars in more than one line, then hit "x" didn't leave an
empty line.  For one line it did leave an empty line.

Message for which autocommand is executing messed up file write message (for
FileWritePost event).

"vim -h" included "-U" even when GUI is not available, and "-l" when lisp is
not available.

Crash for ":he <code class="special">&lt;C-A&gt;</code>" (command-line longer than screen).

":s/this/that/gc", type "y" two times, then undo, did reset the modified
option, even though the file is still modified.

Empty lines in a tags file caused a ":tag" to be aborted.

When hitting 'q' at the more prompt for ":menu", still scrolled a few lines.

In an xterm that uses the bold trick a single row of characters could remain
after an erased bold character.  Now erase one extra char after the bold char,
like for the GUI.

":pop!" didn't work.

When the reading a buffer was interrupted, ":w" should not be able to
overwrite the file, ":w!" is required.

":cf%" caused a crash.

":gui longfilename", when forking is enabled, could leave part of the
longfilename at the shell prompt.

</section><hr class="doubleline" /><section class=inner>
<h4>5.1 版 本                                               <b class="vimtag"> <a name="version-5.1">version-5.1</a> </b></h4>
5.0 和 5.1 版本之间的改进。

主要是一个漏洞修正的发布版，没有很多新特性。


改动                                                    <b class="vimtag"> <a name="changed-5.1">changed-5.1</a> </b>
</section><hr class="singleline" /><section class=inner>

expand() 函数现在用 <code class="special">&lt;NL&gt;</code> 分隔文件名而不是空格。避免内嵌空格文件名出现的问题。
要得到旧的结果，用 substitute(expand(foo), "\n", " ", "g")。

插入扩展用的字典可用反斜杠代表通配符。如果 <a href="options.html#'isk'">'isk'</a> 包含反斜杠的话，允许扩展
"ze\kra"。

Win32 GUI 新图标。

":tag"、":tselect" 等只当参数以 '/' 开始时把它当作正则表达式。避免 ":tag xx~"
给出错误信息: "No previous sub.  regexp"。:tag 参数包含通配字符时亦然，过去和
Vi 不兼容。
用 '/' 时，按本义接受参数有更高的优先级，在通配匹配之前先使用。
只有使用 '/' 时才寻找不同大小写的匹配，即使没有置位 <a href="options.html#'ignorecase'">'ignorecase'</a> 也是如此。
"g^]" 被改为只在匹配的标签多于一个时才做 ":tselect"。

修改部分缺省颜色，因为在深色背景下它们不方便阅读。

搜索模式的字符偏移可以移动光标到下行或上行。同时修正 "/pattern/e+2" 在行尾的
"pattern" 停滞的问题。

状态行上双击不再启动可视模式。拖动状态行不再停止可视模式。

Perl 接口: Buffers() 和 Windows() 现在使用更合乎逻辑的参数，就像 Vim 其余部分
使用的那样 (Moore)。

'" 位置标记的初始值设为首行的第一个字符。自动命令使用 '" 不会出错。


新增                                                    <b class="vimtag"> <a name="added-5.1">added-5.1</a> </b>
</section><hr class="singleline" /><section class=inner>

"shell_error" 内部变量: 最近外壳命令的输出。

":echohl" 命令: 设置 ":echo" 的高亮。

<a href="options.html#'highlight'">'highlight'</a> 的 'S' 标志位和 StatusLineNC 高亮组: 非当前窗口的状态行高亮。当前
窗口的缺省设置使用粗体。

加入 buffer_name() 和 buffer_number() 函数 (Aaron)。
加入 substitute() 函数的 "g" 标志位参数 (Aaron)。
加入 winheight() 函数。

Win32: 如果外部命令用 "start " 开始，不为它打开控制台 (Aaron)。

Win32 控制台: 使用 termcap 代码，根据当前控制台属性处理粗体/反转属性。

configure 检查 "strip"。(Napier)

插入模式的 <code class="keystroke">CTRL-R</code> <code class="keystroke">CTRL-R</code> x: 按本义插入寄存器内容，而不是像键盘输入那样插入。

使一些 "No match" 错误消息提供更多信息: 不匹配的模式。

"make install" 现在也复制宏文件。

tools/tcltags，从 TCL 文件生成标签文件的外壳脚本。

configure 的 "--with-tlib" 设置。使用 termlib 的简单办法: "./configure
--with-tlib=termlib"。

<a href="options.html#'cino'">'cino'</a> 的 'u' 标志位可以设置被包含的 () 部分的缩进。

如果 Win32 OLE 版本不能载入注册的类型库，询问用户是否现在要注册 Vim。(Erhardt)
带 OLE 的 Win32: 自动注册时退出 Vim。
加入 VisVim 1.1b，若干改进和新图标 (Heiko Erhardt)。

加入 Vince Negri 关于 Win32s 支持的补丁。需要用 VC 4.1 编译！

Perl 接口: 加入 $curbuf。使 Buffers() 和 Windows() 更合理。
(Moore) 加入 Msg() 的 "group" 参数。

DOS 源代码归档加入 Perl 文件。修改 Makefile.bor 和 Makefile.w32 以支持编译带
Perl 的 Win32 版本。

加入 Ken Scott 提供的新 Makefile.w32。现在可以 make 所有的 Win32 版本，包括
OLE、Perl 和 Python。

加入 <code class="keystroke">CTRL-W</code> g ] 和 <code class="keystroke">CTRL-W</code> g ^]: 分割窗口并执行 g] 或 g^]。

加入 "g]"，总是为光标所在的标识符执行 ":tselect"。
加入 ":tjump" 和 ":stjump" 命令。
改进 ":tselect" 的列表标签名过长的问题。

加入 Macintosh 版本和 Python 接口的一些补丁。(St-Amant)

如果以前用过某缓冲区，":buf foo" 现在也恢复光标列。

为不同的最终目标调整了语法文件和脚本的 Makefile (用于 Debian Linux)。

Amiga: $VIM 可以在任何地方使用。如果没定义 $VIM，使用 "VIM:"。修正帮助和语法文
件需要 "VIM:" 赋值的问题。现在两者都可以用了。

一些 xterms 发送和 vt100 兼容的功能键 F1-F4。因为无法检测这一点，同时识别两种
类型的键并把它们翻译成 <code class="special">&lt;F1&gt;</code> - <code class="special">&lt;F4&gt;</code>。

加入 "VimEnter" 自动命令。在所有的启动任务之后执行。

BeOS 版本现在可以在 Intel CPU 上运行。(Seibert)。


修正                                                    <b class="vimtag"> <a name="fixed-5.1">fixed-5.1</a> </b>
</section><hr class="singleline" /><section class=inner>

":ts" changed position in the tag stack when cancelled with <code class="special">&lt;CR&gt;</code>.
":ts" changed the cursor position for <code class="keystroke">CTRL-T</code> when cancelled with <code class="special">&lt;CR&gt;</code>.
":tn" would always jump to the second match.    Was using the wrong entry in
the tag stack.
Doing "tag foo", then ":tselect", overwrote the original cursor position in
the tag stack.

"make install" changed the vim.1 manpage in a wrong way, causing "doc/doc"
to appear for the documentation files.

When compiled with MAX_FEAT, xterm mouse handling failed.  Was caused by DEC
mouse handling interfering.

Was leaking memory when using selection in X11.

<code class="keystroke">CTRL-D</code> halfway a command-line left some characters behind the first line(s)
of the listing.

When expanding directories for ":set path=", put two extra backslashes
before a space in a directory name.

When <a href="options.html#'lisp'">'lisp'</a> set, first line of a function would be indented.  Now its indent
is set to zero.  And use the indent of the first previous line that is at
the same () level.  Added test33.

"so<code class="special">&lt;Esc&gt;</code>u" in an empty file didn't work.

DOS: "seek error in swap file write" errors, when using DOS 6.2 share.exe,
because the swap file was made hidden.  It's no longer hidden.

":global" command would sometimes not execute on a matching line.  Happened
when a data block is full in ml_replace().

For AIX use a tgetent buffer of 2048 bytes, instead of 1024.

Win32 gvim now only sets the console size for external commands to 25x80
on Windows 95, not on NT.

Win32 console: Dead key could cause a crash, because of a missing "WINAPI"
(Deshpande).

The right mouse button started Visual mode, even when <a href="options.html#'mouse'">'mouse'</a> is empty, and
in the command-line, a left click moved the cursor when <a href="options.html#'mouse'">'mouse'</a> is empty.
In Visual mode, 'n' in <a href="options.html#'mouse'">'mouse'</a> would be used instead of 'v'.

A blinking cursor or focus change cleared a non-Visual selection.

<code class="keystroke">CTRL-Home</code> and <code class="keystroke">CTRL-End</code> didn't work for MS-DOS versions.

Could include NUL in <a href="options.html#'iskeyword'">'iskeyword'</a>, causing a crash when doing insert mode
completion.

Use _dos_commit() to flush the swap file to disk for MSDOS 16 bit version.

In mappings, <code class="keystroke">CTRL-H</code> was replaced by the backspace key code.  This caused
problems when it was used as text, e.g. ":map _U :%s/.^H//g<code class="special">&lt;CR&gt;</code>".

":set t_Co=0" was not handled like a normal term.  Now it's translated into
":set t_Co=", which works.

For ":syntax keyword" the "transparent" option did work, although not
mentioned in the help.  But synID() returned wrong name.

"gqG" in a file with one-word-per-line (e.g. a dictionary) was very slow and
not interruptible.

"gq" operator inserted screen lines in the wrong situation.  Now screen
lines are inserted or deleted when this speeds up displaying.

cindent was wrong when an "if" contained "((".

'r' flag in <a href="options.html#'viminfo'">'viminfo'</a> was not used for '%'.  Could get files in the buffer
list from removable media.

Win32 GUI with OLE: if_ole_vc.mak could not be converted into a project.
Hand-edited to fix this...

With <a href="options.html#'nosol'">'nosol'</a> set, doing "$kdw" below an empty line positioned the cursor at
the end of the line.

Dos32 version changed "\dir\file" into "/dir/file", to work around a DJGPP
bug.  That bug appears to have been fixed, therefore this translation has
been removed.

"/^*" didn't work (find '*' in first column).

"<code class="special">&lt;afile&gt;</code>" was not always set for autocommands.  E.g., for ":au BufEnter *
let &amp;tags = expand("<code class="special">&lt;afile&gt;</code>:p:h") . "/tags".

In an xterm, the window may be a child of the outer xterm window.  Use the
parent window when getting the title and icon names. (Smith)

When starting with "gvim -bg black -fg white", the value of <a href="options.html#'background'">'background'</a> is
only set after reading the .gvimrc file.  This causes a ":syntax on" to use
the wrong colors.  Now allow using ":gui" to open the GUI window and set the
colors.  Previously ":gui" in a gvimrc crashed Vim.

tempname() returned the same name all the time, unless the file was actually
created.  Now there are at least 26 different names.

File name used for <code class="special">&lt;afile&gt;</code> was sometimes full path, sometimes file name
relative to current directory.

When <a href="options.html#'background'">'background'</a> was set after the GUI window was opened, it could change
colors that were set by the user in the .gvimrc file.  Now it only changes
colors that have not been set by the user.

Ignore special characters after a CSI in the GUI version.  These could be
interpreted as special characters in a wrong way. (St-Amant)

Memory leak in farsi code, when using search or ":s" command.
Farsi string reversing for a mapping was only done for new mappings.  Now it
also works for replacing a mapping.

Crash in Win32 when using a file name longer than _MAX_PATH. (Aaron)

When BufDelete autocommands were executed, some things for the buffer were
already deleted (esp. Perl stuff).

Perl interface: Buffer specific items were deleted too soon; fixes "screen
no longer exists" messages.  (Moore)

The Perl functions didn't set the <a href="options.html#'modified'">'modified'</a> flag.

link.sh did not return an error on exit, which may cause Vim to start
installing, even though there is no executable to install. (Riehm)

Vi incompatibility: In Vi "." redoes the "y" command.  Added the 'y' flag to
<a href="options.html#'cpoptions'">'cpoptions'</a>.  Only for <a href="options.html#'compatible'">'compatible'</a> mode.

":echohl" defined a new group, when the argument was not an existing group.

"syn on" and ":syn off" could move the cursor, if there is a hidden buffer
that is shorter that the current cursor position.

The " mark was not set when doing ":b file".

When a "nextgroup" is used with "skipwhite" in syntax highlighting, space at
the end of the line made the nextgroup also be found in the next line.

":he g&lt;<code class="keystroke">CTRL-D</code>&gt;", then ":" and backspace to the start didn't redraw.

X11 GUI: "gvim -rv" reversed the colors twice on Sun.  Now Vim checks if the
result is really reverse video (background darker than foreground).

"cat link.sh | vim -" didn't set syntax highlighting.

Win32: Expanding "file.sw?" matched ".file.swp".  This is an error of
FindnextFile() that we need to work around.  (Kilgore)

"gqgq" gave an "Invalid lnum" error on the last line.
Formatting with "gq" didn't format the first line after a change of comment
leader.

There was no check for out-of-memory in win_alloc().

"vim -h" didn't mention "-register" and "-unregister" for the OLE version.

Could not increase <a href="options.html#'cmdheight'">'cmdheight'</a> when the last window is only one line.  Now
other windows are also made smaller, when necessary.

Added a few <code class="special">{}</code> to avoid "suggest braces around" warnings from gcc 2.8.x.
Changed return type of main() from void to int. (Nam)

Using '~' twice in a substitute pattern caused a crash.

"syn on" and ":syn off" could scroll the window, if there is a hidden buffer
that is shorter that the current cursor position.

":if 0 | if 1 | endif | endif" didn't work.  Same for ":while" and "elseif".

With two windows on modified files, with <a href="options.html#'autowrite'">'autowrite'</a> set, cursor in second
window, ":qa" gave a warning for the file in the first window, but then
auto-wrote the file in the second window. (Webb)

Win32 GUI scrollbar could only handle 32767 lines.  Also makes the
intellimouse wheel use the configurable number of scrolls. (Robinson)

When using <a href="options.html#'patchmode'">'patchmode'</a>, and the backup file is on another partition, the file
copying messed up the write-file message.

GUI X11: Alt-Backspace and Alt-Delete didn't work.

"`0" could put the cursor after the last character in the line, causing
trouble for other commands, like "i".

When completing tags in insert mode with ^X^], some matches were skipped,
because the compare with other tags was wrong.  E.g., when "mnuFileSave" was
already there, "mnuFile" would be skipped. (Negri)

When scrolling up/down, a syntax item with "keepend" didn't work properly.
Now the flags are also stored for the syntax state at the start of each line.

When <a href="options.html#'ic'">'ic'</a> was changed while <a href="options.html#'hlsearch'">'hlsearch'</a> is on, there was no redraw to show the
effect.

Win32 GUI: Don't display "No write since last chance" in a message box, but in
the Vim window.

</section><hr class="doubleline" /><section class=inner>
<h4>5.2 版 本                                               <b class="vimtag"> <a name="version-5.2">version-5.2</a> </b></h4>
5.1 和 5.2 版本之间的改进。


长行可编辑                                              <b class="vimtag"> <a name="long-lines">long-lines</a> </b>
</section><hr class="singleline" /><section class=inner>

窗口里放不下的长行不再显示 @@@ 了。重画从行内的某个字符开始继续，使得光标周围
的文本可见。这使得打开回绕时，可以编辑长行。


加入文件浏览器                                          <b class="vimtag"> <a name="file-browser-5.2">file-browser-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

Win32、Ahena 和 Motif GUI 上，如果用户请求 ":browse" 并用于 ":e"、":w"、":r"、
":so"、":redirect" 和 ":mkexrc/vimrc/vsess" 命令时，弹出文件请求器。
":browse e /foo/bar" 在 /foo/bar 目录打开请求器，这样，你可以得到很好的右手边
的映射，比如 ":browse so $vim/macros"。如购没有为 ":browse e" 指定初始目录，编
译时可以选择从当前目录还是当前缓冲区的目录开始。(Negri 和 Kahn)
增加了 <a href="options.html#'browsedir'">'browsedir'</a> 选项，可取值 "current"、"last" 或 "buffer"。它说明浏览对话
框从最后使用的目录、当前缓冲区的目录，还是当前目录开始。":browse w" 不受影响。
修改了缺省菜单，现在使用 ":browse" 命令。


加入对话框                                              <b class="vimtag"> <a name="dialogs-added">dialogs-added</a> </b>
</section><hr class="singleline" /><section class=inner>

增加了 ":confirm" 命令。可用于 ":e"、":q"、":w"、":cl"。Win32、Athena 和 Motif
GUI 使用窗口对话框。所有其它的平台使用命令行上的提示。":confirm qa" 提供了保存
所有修改过的文件的选择。

confirm() 函数: 允许用户访问 confirm 机制。

增加了 <a href="options.html#'guioptions'">'guioptions'</a> 的 'v' 标志位。如果包含，总是在 Win32 GUI 对话框里使用垂直
的按钮布局。否则，偏向使用水平布局。

Win32 GUI: ":promptfind" 和 ":promptrepl" 弹出对话框进行搜索/替换。
可用于菜单项目。(Negri)


加入弹出式菜单                                          <b class="vimtag"> <a name="popup-menu-added">popup-menu-added</a> </b>
</section><hr class="singleline" /><section class=inner>

如果 <a href="options.html#'mousemodel'">'mousemodel'</a> 选项设为 "popup"，鼠标右键显示 "PopUp" 顶层菜单，作为弹出的
关联菜单。"PopUp" 菜单不再普通的菜单栏上提示。目前，只支持 Win32 和 Athena
GUI。


加入选择模式                                            <b class="vimtag"> <a name="new-Select-mode">new-Select-mode</a> </b>
</section><hr class="singleline" /><section class=inner>

加入了新模式: "选择模式"。类似于可视模式，但输入可显示的字符将替换选择区。
- <code class="keystroke">CTRL-G</code> 可以用来切换可视模式和选择模式。
- <code class="keystroke">CTRL-O</code> 可以用来为单个命令从选择模式切换到选择模式。
- 加入 <a href="options.html#'selectmode'">'selectmode'</a> 选项: 说明何时启动选择模式，而不是可视模式。
- 加入 <a href="options.html#'mousemodel'">'mousemodel'</a> 选项: 改变鼠标键的应用。
- 加入 <a href="options.html#'keymodel'">'keymodel'</a> 选项: 指示使用 Shift + 特殊键可以启动可视或选择模式的选择。
- 加入 ":behave"。可以用来快速设置 <a href="options.html#'selectmode'">'selectmode'</a>、<a href="options.html#'mousemodel'">'mousemodel'</a> 和 <a href="options.html#'keymodel'">'keymodel'</a> 的
  MS-Windows 和 xterm 行为。
- xterm 风格的选择现在成为无模式的选择。
- 选择模式使用可视模式的映射和菜单。它们自动先切换到可视模式。之后，重新选择区
  域，除非该区域已被删除。"gV" 命令用来在映射里跳过重新选择这一步。
- 增加 "gh"、"gH" 和 "g^H" 命令: 开始选择 (高亮) 模式。
- 选择模式的退格键删除选择区。

"mswin.vim" 脚本。设置非常类似于 MS-Windows 的行为。


加入会话文件                                            <b class="vimtag"> <a name="new-session-files">new-session-files</a> </b>
</section><hr class="singleline" /><section class=inner>

":mks[ession]" 类似于 "mkvimrc"，但写入当前载入缓冲区的完整文件名和当前目录，
使得执行该文件可以重新载入这些文件并切换到该目录。也保存和恢复窗口。使文件名相
对于会话文件。
<a href="options.html#'sessionoptions'">'sessionoptions'</a> 选项设置 ":mksession" 的行为。(Negri)


用户定义的函数和命令                                    <b class="vimtag"> <a name="new-user-defined">new-user-defined</a> </b>
</section><hr class="singleline" /><section class=inner>

加入用户定义函数。用 ":function" 开始定义，到 ":endfunction" 位置。
调用方式为 "Func()"。允许使用可变数量的参数。
包含局部变量 "l:name" 的支持。用 ":return" 返回值。
见  <a href="userfunc.html#:function">:function</a> 。
用 ":call" 调用函数。如果提供了范围，该范围的每行执行一次该函数。 <a href="userfunc.html#:call">:call</a> 
"macros/justify.vim" 是使用用户定义函数的例子。
用户函数不改变最近使用的搜索模式，或 "." 重复的命令。
<a href="options.html#'maxfuncdepth'">'maxfuncdepth'</a> 函数。限制函数调用的深度。避免函数使用无限递归的麻烦 (因为内存
溢出而崩溃)。

用户定义的 Ex 命令: ":command"、":delcommand" 和 ":comclear"。(Moore)  见
 <a href="map.html#user-commands">user-commands</a> 。


新接口                                                  <b class="vimtag"> <a name="interfaces-5.2">interfaces-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

Tcl 接口。(Wilken) 见  <a href="if_tcl.html#tcl">tcl</a> 。
使用 ":tcl"、":tcldo" 和 "tclfile" 命令。

Cscope 支持。(Kahn) (Sekera) 见  <a href="if_cscop.html#cscope">cscope</a> 。
使用 ":cscope" 和 ":cstag" 命令。使用选项 <a href="options.html#'cscopeprg'">'cscopeprg'</a>、<a href="options.html#'cscopetag'">'cscopetag'</a>、
<a href="options.html#'cscopetagorder'">'cscopetagorder'</a> 和 <a href="options.html#'cscopeverbose'">'cscopeverbose'</a>。


新移植版本                                              <b class="vimtag"> <a name="ports-5.2">ports-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

Amiga GUI 移植版本。(Nielsen) 还没有充分测试！

RISC OS 版本。(Thomas Leonard) 见  <a href="os_risc.html#riscos">riscos</a> 。
该版本可以在 GUI 或文本模式下运行，取决于在哪里调用。
删除了 "os_archie" 文件，反正它们也不再工作了。


多字节支持                              <b class="vimtag"> <a name="new-multi-byte">new-multi-byte</a> </b> <b class="vimtag"> <a name="new-multibyte">new-multibyte</a> </b>
</section><hr class="singleline" /><section class=inner>

Win32 GUI 的多字节支持。(Baek)
<a href="options.html#'fileencoding'">'fileencoding'</a> 选项决定文件里的文本是如何编码的。
多字节字符可以用 ":ascii"。多字节字符可以在 Windows 95 工作，即使使用北美版本
也是如此。(Aaron)
需要在 feature.h 里打开。
还没有充分测试！


新函数                                                  <b class="vimtag"> <a name="new-functions-5.2">new-functions-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

 <a href="builtin.html#browse()">browse()</a>       如果可用，给出文件请求器。(Negri)
 <a href="builtin.html#escape()">escape()</a>       字符串里用反斜杠给字符转义。
 <a href="builtin.html#fnamemodify()">fnamemodify()</a>  修改文件名。
 <a href="builtin.html#input()">input()</a>        请求用户输入一行。(Aaron) input() 函数输入的行有单独的历史。
 <a href="builtin.html#argc()">argc()</a> 
 <a href="builtin.html#argv()">argv()</a>         可以用来访问参数列表。
 <a href="builtin.html#winbufnr()">winbufnr()</a>     窗口的缓冲区号。(Aaron)
 <a href="builtin.html#winnr()">winnr()</a>        窗口号。(Aaron)
 <a href="builtin.html#matchstr()">matchstr()</a>     返回匹配的字符串。
 <a href="builtin.html#setline()">setline()</a>      设置一行为某字符串值。


新选项                                                  <b class="vimtag"> <a name="new-options-5.2">new-options-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

<a href="options.html#'allowrevins'">'allowrevins'</a>   允许在插入和命令行模式里使用 <code class="keystroke">CTRL-_</code> 命令。
<a href="options.html#'browsedir'">'browsedir'</a>     指示浏览对话框从在哪个目录开始。
<a href="options.html#'confirm'">'confirm'</a>       如果置位，:q :w 和 :e 命令总是和使用了 ":confirm" 一样。
                (Negri)
<a href="options.html#'cscopeprg'">'cscopeprg'</a>
<a href="options.html#'cscopetag'">'cscopetag'</a>
<a href="options.html#'cscopetagorder'">'cscopetagorder'</a>
<a href="options.html#'cscopeverbose'">'cscopeverbose'</a> 设置  <a href="if_cscop.html#cscope">cscope</a>  行为。
<a href="options.html#'filetype'">'filetype'</a>      RISC-OS 专用的文件类型。
<a href="options.html#'grepformat'">'grepformat'</a>
<a href="options.html#'grepprg'">'grepprg'</a>       为  <a href="quickfix.html#:grep">:grep</a>  命令使用。
<a href="options.html#'keymodel'">'keymodel'</a>      指示使用 Shift + 特殊键可以启动可视或选择模式的选择。
<a href="options.html#'listchars'">'listchars'</a>     设置 <a href="options.html#'list'">'list'</a> 模式里行尾、制表和拖尾空格所显示的字符。(部分来自
                Smith) 也设置如果置位了 <a href="options.html#'nowrap'">'nowrap'</a> 时，如果一行放不下时要显示的
                字符。
<a href="options.html#'matchpairs'">'matchpairs'</a>    允许 '&lt;' 和 '&gt;' 的匹配，还有其它的单字符组对。
<a href="options.html#'mousefocus'">'mousefocus'</a>    窗口焦点追随鼠标 (部分来自 Terhaar)。用键盘命令改变焦点移动指
                针到该窗口。同时在改变窗口布局时 (分割窗口、改变窗口高度等) 移
                动指针。
<a href="options.html#'mousemodel'">'mousemodel'</a>    改变鼠标按钮的使用方式。
<a href="options.html#'selection'">'selection'</a>     如果设为 "inclusive" 或 "exclusive"，光标可以在可视或选择模式
                里到行尾之后一个字符的位置。如果设为 "old"，则使用旧行为。如果
                是 "inclusive"，光标所在的字符包含在操作里。如果使用
                "exclusive"，使用 <a href="options.html#'guicursor'">'guicursor'</a> 新的 "ve" 项。缺省为垂直线。
<a href="options.html#'selectmode'">'selectmode'</a>    说明何时开始选择模式，而不是可视模式。
<a href="options.html#'sessionoptions'">'sessionoptions'</a> 设置 ":mksession" 的行为。(Negri)
<a href="options.html#'showfulltag'">'showfulltag'</a>   在插入模式补全标签时，显示标签搜索模式 (整齐格式) 作为可能的一
                个选择 (如果有的话)。
<a href="options.html#'swapfile'">'swapfile'</a>      缓冲区是否使用交换文件。
<a href="options.html#'syntax'">'syntax'</a>        如果设置，载入该名字的语法。允许从模式行里设置特定的语法。
<a href="options.html#'ttymouse'">'ttymouse'</a>      允许名字不以 "xterm" 开始的终端使用 xterm 的鼠标代码。
<a href="options.html#'wildignore'">'wildignore'</a>    不应该参与补全的文件名模式的列表。
<a href="options.html#'wildmode'">'wildmode'</a>      可以用于设置 <a href="options.html#'wildchar'">'wildchar'</a> 的扩展类型。
                替换用于命令行补全的 <code class="keystroke">CTRL-T</code> 命令。
                列出所有匹配时，不响铃。
<a href="options.html#'winaltkeys'">'winaltkeys'</a>    Win32 和 Motif GUI。如果为 "yes"，ALT 键完全由窗口系统处理。如
                果为 "no"，窗口系统完全不使用 ALT 键。如果为 "menu"，这取决于
                该键是否是菜单快捷键。
<a href="options.html#'winminheight'">'winminheight'</a>  每个窗口的最小高度。缺省为 1。如果你想要零行的窗口，设为 0。如
                果窗口高度为零，不显示滚动条。(Negri)



新 Ex 命令                                              <b class="vimtag"> <a name="new-ex-commands-5.2">new-ex-commands-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

 <a href="windows.html#:badd">:badd</a>          把文件名加到缓冲区列表，没有副作用。(Negri)
 <a href="gui.html#:behave">:behave</a>        快速设置 MS-Windows 或 xterm 行为。
 <a href="editing.html#:browse">:browse</a>        使用文件选择对话框。
 <a href="userfunc.html#:call">:call</a>          调用函数，可选使用行范围。
 <a href="quickfix.html#:cnewer">:cnewer</a> 
 <a href="quickfix.html#:colder">:colder</a>        访问快速修复错误列表的堆栈。
 <a href="map.html#:comclear">:comclear</a>      清除所有的用户定义命令。
 <a href="map.html#:command">:command</a>       定义用户命令。
 <a href="eval.html#:continue">:continue</a>      回到 ":while"。
 <a href="editing.html#:confirm">:confirm</a>       如果有意想不到的事发生，请求确认。
 <a href="if_cscop.html#:cscope">:cscope</a>        执行 cscope 命令。
 <a href="if_cscop.html#:cstag">:cstag</a>         用 cscope 来跳转到标签。
 <a href="map.html#:delcommand">:delcommand</a>    删除用户定义命令。
 <a href="userfunc.html#:delfunction">:delfunction</a>   删除用户定义函数。
 <a href="userfunc.html#:endfunction">:endfunction</a>   结束用户定义函数。
 <a href="userfunc.html#:function">:function</a>      定义用户定义函数。
 <a href="quickfix.html#:grep">:grep</a>          类似于 ":make"。(Negri)
 <a href="starting.html#:mksession">:mksession</a>     建立会话文件。
 <a href="pattern.html#:nohlsearch">:nohlsearch</a>    暂时停止 <a href="options.html#'hlsearch'">'hlsearch'</a> 高亮。
 <a href="various.html#:Print">:Print</a>         和 Vi 兼容。和 ":print" 相同。
 <a href="change.html#:promptfind">:promptfind</a>    搜索对话框 (Win32 GUI)。
 <a href="change.html#:promptrepl">:promptrepl</a>    搜索/替代对话框 (Win32 GUI)。
 <a href="userfunc.html#:return">:return</a>        从用户定义函数里返回。
 <a href="gui_w32.html#:simalt">:simalt</a>        Win32 GUI: 模拟 alt 键的键击。(Negri)
 <a href="change.html#:smagic">:smagic</a>        类似于 ":substitute"，但总是使用 <a href="options.html#'magic'">'magic'</a>。
 <a href="change.html#:snomagic">:snomagic</a>      类似于 ":substitute"，但总是使用 <a href="options.html#'nomagic'">'nomagic'</a>。
 <a href="if_tcl.html#:tcl">:tcl</a>           执行 TCL 命令。
 <a href="if_tcl.html#:tcldo">:tcldo</a>         在行范围上执行 TCL 命令。
 <a href="if_tcl.html#:tclfile">:tclfile</a>       执行 TCL 脚本文件。
 <a href="gui_w32.html#:tearoff">:tearoff</a>       可撕下的菜单 (Win32 GUI)。
 <a href="gui.html#:tmenu">:tmenu</a> 
 <a href="gui.html#:tunmenu">:tunmenu</a>       Win32 GUI: 菜单工具提示。(Negri)
 <a href="cmdline.html#:star">:star</a>  :*      执行寄存器。


改动                                                    <b class="vimtag"> <a name="changed-5.2">changed-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

换名的函数:
                buffer_exists()    -&gt; bufexists()
                buffer_name()      -&gt; bufname()
                buffer_number()    -&gt; bufnr()
                file_readable()    -&gt; filereadable()
                highlight_exists() -&gt; hlexists()
                highlightID()      -&gt; hlID()
                last_buffer_nr()   -&gt; bufnr("$")
为了后向兼容，仍然可以使用旧名。

只有新的 <a href="options.html#'allowrevins'">'allowrevins'</a> 选项置位时才可以用插入模式和命令行模式的 <code class="keystroke">CTRL-_</code> 命令。
这是为了避免按 SHIFT-_ 的人不小心进入反向插入模式而不知所措。

如果 ":tselect" 列表的文件名过长，删除中间部分并放上 "..."。

Win32 GUI: 使字体选择器出现在 Vim 窗口中间，不是随便的某个位置。(Negri)

":bn" 跳过帮助缓冲区，除非现在就在帮助缓冲区。(Negri)

如果有状态行并且只有一个窗口，不显示当前窗口的状态行中的 '^'。

过去 ":*" 相当于 "'&lt;,'&gt;"，即可视区域。但在 Vi 里它用作 ":@"。如果 <a href="options.html#'cpoptions'">'cpoptions'</a>
包含 '*'，使用 Vi 兼容行为。

如果置位 <a href="options.html#'insertmode'">'insertmode'</a>，用 <code class="keystroke">CTRL-O</code> 执行映射如同没有置位 <a href="options.html#'insertmode'">'insertmode'</a> 。这样，即
使置位 <a href="options.html#'insertmode'">'insertmode'</a>，也可以使用 "正常的" 映射。

如果已经设置 <a href="options.html#'mouse'">'mouse'</a> (比如通过 .vimrc 文件)，GUI 启动时不自动设置 <a href="options.html#'mouse'">'mouse'</a>。

从 <a href="options.html#'mouse'">'mouse'</a> 选项删除 'N'、'I' 和 'A' 标志位。

"切换选项" 更名为 "布尔选项"。有人会认为 ":set xyz" 每次都会切换 <code class="badlink">'xyz'</code> 开/关。

内部变量 "shell_error" 包含外壳的错误代码，而不只是 0 或 1。

插入或替换时，输入 <code class="keystroke">CTRL-V</code> CTRL-<code class="special">&lt;CR&gt;</code> 过去插入 "<code class="special">&lt;C-CR&gt;</code>"。这不是很有用。现在忽略
CTRL 键而插入 <code class="special">&lt;CR&gt;</code>，和其他带修饰符的 "普通" 键相同。这些带修饰符的键组合仍然可
以映射。
插入模式下，可以用 <code class="keystroke">CTRL-K</code> 加 <code class="special">&lt;C-CR&gt;</code> 或 <code class="special">&lt;S-Space&gt;</code> 插入这些特殊字符。

"quotes" 文件移到 doc/quotes.txt，而 "todo" 文件移到 doc/todo.txt。它们现在和
其它文档文件一样安装。

winheight() 函数对不存在的窗口返回 -1。过去返回 0，但现在这是一个合法的高度。

<a href="options.html#'selection'">'selection'</a> 的缺省值现在是 "inclusive"。使用 "$" 或在可视模式下用鼠标移动光标
时会看到区别。

存在修改过的隐藏缓冲区时 ":q!" 不退出。":qa!" 则总能退出。

缺省关闭 Perl/Python/Tcl 接口。用的人不是很多，但它们的存在使得可执行文件大很
多。现在对于多数任务而言，内部脚本语言已经足够强大。

<a href="options.html#'titlestring'">'titlestring'</a> 和 <a href="options.html#'iconstring'">'iconstring'</a> 选项的字符串不经翻译而直接用于窗口标题和图标。这
样就可以在里面包含 <code class="special">&lt;CR&gt;</code>。以前 <code class="special">&lt;CR&gt;</code> 会显示为 "^M" (两个字符)。

从插入模式启动可视或选择模式下的映射时 (模式显示 "(insert) Visual")，直到映射
完成为止才返回插入模式。这样，可视模式的映射也能用于从选择模式开始的可视模式。

$VIMRUNTIME/menu.vim 的菜单不再否决已有的菜单。这样可以在 .vimrc 文件或者执行
mswin.vim 时定义菜单。

Unix: 如果存在，使用 /var/tmp 来保存 .swp 文件。那里的文件在系统重启时仍然存在
(至少 Linux 如此)。


新增                                                    <b class="vimtag"> <a name="added-5.2">added-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

configure 参数 --with-motif-lib，使用静态 Motif 库。

支持数字键盘 +、-、*、/ 键的映射。(Negri)
如果不映射，和普通字符相同。

Win32 GUI: 如果放置目录到 gVim 上，cd 到那里并编辑新缓冲区。(Negri)

Win32 GUI: <code class="keystroke">CTRL-Break</code> 用于中断，这样 <code class="keystroke">CTRL-C</code> 就可用作映射。

":map" 的输出高亮 "*"，明白说明它不是 rhs 的一部分。(Roemer)

显示可视区域时，现在不关闭光标，方便定位。 GUI 现在使用灰色背景高亮可视区域，
这样即使光标反转也依然保持可见。

Win32: 启动时如果使用单个完整路径名 (例如双击文件)，cd 到文件的目录。(Negri)

Win32 GUI: 可撕下菜单，用 ":tearoff <code class="special">&lt;menu-name&gt;</code>" 命令实现。(Negri)
<a href="options.html#'guioptions'">'guioptions'</a> 的 't' 选项: 为 Win32 GUI 和 Motif 加入可撕下菜单项目。缺省包含。
Win32 GUI: 用 "&gt;&gt;" 指示带子菜单的可撕下菜单。(Negri)

加入 ^Kaa 和 ^KAA 二合字母。
"euro" 符号加到 digraph.c。(Corry)

支持 Motif 菜单快捷键。'&amp;' 的使用方式类似于 MS-Windows (Ollis)。
其它的 GUI 忽略菜单名里面的 '&amp;'。

DJGPP: 屏幕更新更快 (John Lange)。

对语法组进行簇合 ":syntax cluster" (Bigham)。
语法文件的包含: ":syntax include" (Bigham)。

如果 <a href="options.html#'nosol'">'nosol'</a> 置位的话，切换缓冲区时保持列不变 Radics)。

Perl 接口的 Number 函数。

Athena GUI 的 Intellimouse (智能鼠标) 支持。(Jensen)

":sleep" 也接受 "m" 表示的毫秒参数。

<a href="options.html#'guioptions'">'guioptions'</a> 加入 'p' 标志位: 安装进入/退出窗口事件的回调。Terhaar 的光标闪烁
现在能用了，但我的不行了。

"--help" 和 "--version" 命令行参数。

":list" 输出的非文本使用 NonText 高亮。

加入文本对象: "i(" 和 "i)" 同义于 "ib"，"i{" 和 "i}" 同义于 "iB"。新出现: "i&lt;"
和 "i&gt;"，选择 <code class="special">&lt;thing&gt;</code> (<code class="special">&lt;&gt;</code> 块)。另外，这些都支持 "a" 对象。

<a href="options.html#'shortmess'">'shortmess'</a> 的 'O' 标志位: 读入文件的消息覆盖以前的消息。(Negri)

Win32 GUI: <a href="options.html#'guioptions'">'guioptions'</a> 的 'T' 标志位: 切换工具栏的开/关。包含自己制作的工具栏
位图的列表。(Negri)

加入子菜单的菜单优先级。Win32 和 Motif GUI 有实现。
":menu" 命令显示菜单优先级。
Default 和 Syntax 菜单现在包含项目的优先级。可以在缺省项目之间插入菜单项目。

打开 <a href="options.html#'number'">'number'</a> 选项时，用 LineNr 组高亮行号。

"Ignore" 高亮组: 用它高亮的文本被置为空白。用于隐藏帮助文本的特殊字符。

加入 Exuberant Ctags 2.3 版本。它包含 C++ 支持、Java 支持和递归访问目录。
(Hiebert)

如果标签文件没有排序并且检测到如此 (用一个简单的方法)，报错。

":unlet" 接受 "!"，忽略不存在的变量并接受多于一个参数。(Roemer)
补全 ":unlet" 的变量名。(Roemer)

如果被其它函数调用的函数里有错误，错误信息里显示调用栈。

新文件名修饰符:
":.": 简约相对于当前目录的文件名。
":~": 简约相对于主目录的文件名。
":s?pat?sub?": "pat" 替代为 "sub" 一次。
":gs?pat?sub?": 所有的 "pat" 替代为 "sub"。

新 configure 参数: --enable-min-features 和 --enable-max-features。切换到最小
和最大特性包的简单方法。

新的编译时特性: modify_fname。用于文件名修饰符，例如 "%:p:h"。可关闭以减少一些
代码 (16 位 DOS)。

插入模式下使用整行补全时如果置位 <a href="options.html#'cindent'">'cindent'</a>，合适地缩进该行。

MSDOS 和 Win32 控制台: <a href="options.html#'guicursor'">'guicursor'</a> 设置光标的厚度。(Negri)

包含新的波斯语字体集合。(Shiran)

加速键文本现在也能用于 Motif。所有菜单可以用 &amp; 定义助记，TAB 定义加速键文本。
不支持的系统忽略之。
删除或替换菜单时，菜单名的比较到助记符之前的 <code class="special">&lt;Tab&gt;</code> 为止。

":substitute" 之后的 'i' 和 'I' 标志位: 忽略大小写与否。

如果丢失运行时文件，"make install" 会抱怨。

Unix: 找到已有但不能打开的交换文件时，在 ATTENTION 消息里提及文件的拥有者。

<a href="options.html#'complete'">'complete'</a> 的 'i'、't' 和 'k' 选项现在显示正在寻找的匹配所在的位置。(Acevedo)

"gJ" 命令: 连接行且不插入空格。

设置 <a href="options.html#'keywordprg'">'keywordprg'</a> 为 "man -s" 会进行特殊处理。如果没有计数，删除 "-s"，否则加
入计数。configure 会检查 "man -s 2 read" 是否能用，并据此设置 <a href="options.html#'keywordprg'">'keywordprg'</a> 的
缺省值。

如果执行 ":bd" 时只打开一个窗口，VIm 试图移动到相同类型的缓冲区 (也就是说，非
帮助到非帮助，帮助到帮助)，这样和 :bnext/:bprev 的行为一致。(Negri)

允许映射的右手边使用 "<code class="special">&lt;Nop&gt;</code>"。":map xx <code class="special">&lt;Nop&gt;</code>"，定义 "xx" 为空。

":menu" 命令可用 "<code class="special">&lt;Tab&gt;</code>" 代替菜单路径里真正的制表。这使输入更容易，因为不需要
反斜杠。

POSIX 兼容的正则表达式字符类: [:alnum:]、[:alpha:]、[:blank:]、[:cntrl:]、
[:digit:]、[:graph:]、[:lower:]、[:print:]、[:punct:], [:space:]、[:upper:]
和 [:xdigit:]。(Briscoe)

正则表达式字符类 (为了快速语法高亮匹配):
        数字:       \d [0-9]            \D  非数字 (Roemer)
        十六进制:   \x [0-9a-fA-F]      \X  非十六进制
        八进制:     \o [0-7]            \O  非八进制
        单词:       \w [a-zA-Z0-9_]     \W  非单词
        单词首字符: \h [a-zA-Z_]        \H  非单词首字符
        字母:       \a [a-zA-Z]         \A  非字母
        小写:       \l [a-z]            \L  非小写
        大写:       \u [A-Z]            \U  非大写

":set" 现在接受 "+="、"^=" 和 "-=": 从字符串选项加入或删除部分内容，从数值选项
加入或减去数值。逗号分隔的列表选项自动 (神奇) 地插入或删除逗号。

文件类型特性，用于自动命令。使用文件类型代替模式来匹配文件。目前只用于 RISC
OS。(Leonard)

自动命令的模式里可用环境变量。它们在定义自动命令时扩展。

"BufFilePre" 和 "BufFilePost" 自动命令事件: ":file" 命令改变缓冲区名的前与后。
"VimLeavePre" 自动命令事件: 写入 .viminfo 文件前。

自动命令参数: <code class="special">&lt;abuf&gt;</code> 代表缓冲区号，和 <code class="special">&lt;afile&gt;</code> 类似。

保持更多的同步上下文，往回滚动时语法高亮的速度稍快。

Win32 GUI: 删除或插入屏幕行时避免重画以加快滚动。

GUI: 拇指移动小于一个像素时不重画滚动条以加快滚动。

bugreport.vim 里加入 ":highlight"。

建立 install.exe 程序，简化 DOS 和 MS-Windows 的安装。

新寄存器: '_'，黑洞。写入时什么都不做。读取则总是为空。可用于避免删除或修改命
令对寄存器的改变，或用于减少大改变的内存开销。

<code class="keystroke">CTRL-V</code> xff 用十六进制值输入字符。<code class="keystroke">CTRL-V</code> o123 用八进制输入字符。(Aaron)

改进语法高亮的性能，如果没有 "keepend"，跳过相应的检查。

模式消息 ("-- INSERT --") 移到屏幕的末行。如果 <a href="options.html#'cmdheight'">'cmdheight'</a> 大于一，消息仍然可
以阅读。

列出匹配文件时，用 <a href="options.html#'suffixes'">'suffixes'</a> 进行排序，这和 <code class="keystroke">CTRL-N</code> 提取它们时列出的顺序相同。

synIDattr() 接受 (可选的) 第三个参数，属性所属的终端类型。可用来在 gvim 之外运
行 2html.vim (要用颜色名代替 #RRGGBB)。

对内存进行刨视 (profile)，用于调试。退出或 "g^A" 命令会显示结果。(Kahn)

DOS: 使用当前驱动器的文件时删除驱动器名: "A:\dir\file" -&gt; "\dir\file"。有助于
移动软盘上的会话文件: "A:\dir" 到 "B:\dir"。

能记住的跳转的数目从每窗口 30 个增加到 50 个。

暂时关闭 <a href="options.html#'hls'">'hls'</a> 高亮直到下次搜索: ":nohlsearch"。

"gp" 和 "gP" 命令: 类似于 "p" 和 "P"，但把光标刚好放在插入文本之后。MS-Windows
模式用于 <code class="keystroke">CTRL-V</code> 命令。


修正                                                    <b class="vimtag"> <a name="fixed-5.2">fixed-5.2</a> </b>
</section><hr class="singleline" /><section class=inner>

Win32 GUI: Could draw text twice in one place, for fake-bold text.  Removed
this, Windows will handle the bold text anyway. (Negri)

patch 5.1.1: Win32s GUI: pasting caused a crash (Negri)

patch 5.1.2: When entering another window, where characters before the cursor
have been deleted, could have a cursor beyond the end of the line.

patch 5.1.3: Win32s GUI: Didn't wait for external command to finish. (Negri)

patch 5.1.4: Makefile.w32 can now also be used to generate the OLE version
(Scott).

patch 5.1.5: Crashed when using syntax highlighting: cursor on a line that
doesn't fit in the window, and splitting that line in two.

patch 5.1.6: Visual highlighting bug: After ":set nowrap", go to end of line
(so that the window scrolls horizontally), ":set wrap".  Following Visual
selection was wrong.

patch 5.1.7: When <a href="options.html#'tagbsearch'">'tagbsearch'</a> off, and <a href="options.html#'ignorecase'">'ignorecase'</a> off, still could do
binary searching.

patch 5.1.8: Win32 GUI: dragging the scrollbar didn't update the ruler.

patch 5.1.9: Using ":gui" in .vimrc, caused xterm cursor to disappear.

patch 5.1.10: A <code class="keystroke">CTRL-N</code> in Insert mode could cause a crash, when a buffer
without a name exists.

patch 5.1.11: "make test" didn't work in the shadow directory.  Also adjusted
"make shadow" for the links in the ctags directory.

patch 5.1.12: "buf 123foo" used "123" as a count, instead as the start of a
buffer name.

patch 5.1.13: When completing file names on the command-line, reallocating the
command-line may go wrong.

patch 5.1.14: ":[nvci]unmenu" removed menu for all modes, when full menu patch
specified.

Graceful handling of NULLs in drag-dropped file list.  Handle passing NULL to
Fullname_save(). (Negri)

Win32: ":!start" to invoke a program without opening a console, swapping
screens, or waiting for completion in either console or gui version. e.g. you
can type ":!start winfile".  ALSO fixes "can't delete swapfile after spawning
a shell" bug. (enhancement of Aaron patch) (Negri)

Win32 GUI: Fix <code class="keystroke">CTRL-X</code> default keymapping to be more Windows-like. (Negri)

Shorten filenames on startup.  If in /foo/bar, entering "vim ../bar/bang.c"
displays "bang.c" in status bar, not "/foo/bar/bang.c"  (Negri)

Win32 GUI: No copy to Windows clipboard when it's not desired.

Win32s: Fix pasting from clipboard - made an assumption not valid under
Win32s. (Negri)

Win32 GUI: Speed up calls to gui_mch_draw_string() and cursor drawing
functions. (Negri)

Win32 GUI: Middle mouse button emulation now works in GUI! (Negri)

Could skip messages when combining commands in one line, e.g.:
":echo "hello" | write".

Perl interpreter was disabled before executing VimLeave autocommands.  Could
not use ":perl" in them.  (Aaron)

Included patch for the Intellimouse (Aaron/Robinson).

Could not set <a href="options.html#'ls'">'ls'</a> to one, when last window has only one line.  (Mitterand)

Fixed a memory leak when removing menus.

After ":only" the ruler could overwrite a message.

Dos32: removed changing of __system_flags.  It appears to work better when
it's left at the default value.

p_aleph was an int instead of along, caused trouble on systems where
sizeof(int) != sizeof(long). (Schmidt)

Fixed enum problems for Ultrix. (Seibert)

Small redraw problem: "dd" on last line in file cleared wrong line.

Didn't interpret "cmd | endif" when "cmd" starts with a range.  E.g. "if 0 |
.d | endif".

Command "+|" on the last line of the file caused ml_get errors.

Memory underrun in eval_vars(). (Aaron)

Don't rename files in a difficult way, except on Windows 95 (was also done on
Windows NT).

Win32 GUI: An external command that produces an error code put the error
message in a dialog box.  had to close the window and close the dialog.  Now
the error code is displayed in the console. (Negri)

"comctl32.lib" was missing from the GUI libraries in Makefile.w32. (Battle)

In Insert mode, when entering a window in Insert mode, allow the cursor to be
one char beyond the text.

Renamed machine dependent rename() to mch_rename().  Define mch_rename() to
rename() when it works properly.

Rename vim_chdir() to mch_chdir(), because it's machine dependent.

When using an arglist, and editing file 5 of 4, ":q" could cause "-1 more
files to edit" error.

In if_python.c, VimCommand() caused an assertion when a do_cmdline() failed.
Moved the Python_Release_Vim() to before the VimErrorCheck().  (Harkins)

Give an error message for an unknown argument after "--".  E.g. for "vim
--xyz".

The FileChangedShell autocommand didn't set <code class="special">&lt;afile&gt;</code> to the name of the changed
file.

When doing ":e file", causing the attention message, there sometimes was no
hit-enter prompt.  Caused by empty line or "endif" at end of sourced file.

A large number of patches for the VMS version. (Hunsaker)

When <code class="keystroke">CTRL-L</code> completion (find longest match) results in a shorter string, no
completion is done (happens with ":help").

Crash in Win32 GUI version, when using an Ex "@" command, because
LinePointers[] was used while not initialized.

Win32 GUI: allow mapping of Alt-Space.

Output from "vim -h" was sent to stderr.  Sending it to stdout is better, so
one can use "vim -h | more".

In command-line mode, ":vi[!]" should reload the file, just like ":e[!]".
In Ex mode, ":vi" stops Ex mode, but doesn't reload the file.  This is Vi
compatible.

When using a ":set ls=1" in the .gvimrc file, would get a status line for a
single window.  (Robinson)

Didn't give an error message for ":set ai,xx". (Roemer)
Didn't give an error message for ":set ai?xx", ":set ai&amp;xx", ":set ai!xx".

Non-Unix systems: That a file exists but is unreadable is recognized as "new
file".  Now check for existence when file can't be opened (like Unix).

Unix: osdef.sh didn't handle declarations where the function name is at the
first column of the line.

DJGPP: Shortening of file names didn't work properly, because get_cwd()
returned a path with backslashes. (Negri)

When using a <a href="options.html#'comments'">'comments'</a> part where a space is required after the middle part,
always insert a space when starting a new line.  Helps for C comments, below a
line with "/****".

Replacing path of home directory with "~/" could be wrong for file names
with embedded spaces or commas.

A few fixes for the Sniff interface. (Leherbauer)

When asking to hit 'y' or 'n' (e.g. for ":3,1d"), using the mouse caused
trouble.  Same for ":s/x/y/c" prompt.

With <a href="options.html#'nowrap'">'nowrap'</a> and <a href="options.html#'list'">'list'</a>, a Tab halfway on the screen was displayed as blanks,
instead of the characters specified with <a href="options.html#'listchars'">'listchars'</a>.  Also for other
characters that take more than one screen character.

When setting <a href="options.html#'guifont'">'guifont'</a> to an unknown font name, the previous font was lost and
a default font would be used. (Steed)

DOS: Filenames in the root directory didn't get shortened properly. (Negri)

DJGPP: making a full path name out of a file name didn't work properly when
there is no _fullpath() function. (Negri)

Win32 console: ":sh" caused a crash. (Negri)

Win32 console: Setting <a href="options.html#'lines'">'lines'</a> and/or <a href="options.html#'columns'">'columns'</a> in the _vimrc failed miserably
(could hang Windows 95). (Negri)

Win32: The change-drive function was not correct, went to the wrong drive.
(Tsindlekht)

GUI: When editing a command line in Ex mode, Tabs were sometimes not
backspaced properly, and unprintable characters were displayed directly.
non-GUI can still be wrong, because a system function is called for this.

":set" didn't stop after an error.  For example ":set no ai" gave an error for
"no", but still set "ai".  Now ":set" stops after the first error.

When running configure for ctags, $LDFLAGS wasn't passed to it, causing
trouble for IRIX.

"@%" and "@#" when file name not set gave an error message.  Now they just
return an empty string. (Steed)

<code class="keystroke">CTRL-X</code> and <code class="keystroke">CTRL-A</code> didn't work correctly with negative hex and octal numbers.
(Steed)

":echo" always started with a blank.

Updating GUI cursor shape didn't always work (e.g., when blinking is off).

In silent Ex mode ("ex -s" or "ex &lt;file") ":s///p" didn't print a line.  Also
a few other commands that explicitly print a text line didn't work.  Made this
Vi compatible.

Win32 version of _chdrive() didn't return correct value. (Tsindlekht)

When using 't' in <a href="options.html#'complete'">'complete'</a> option, no longer give an error message for a
missing tags file.

Unix: tgoto() can return NULL, which was not handled correctly in configure.

When doing ":help" from a buffer where <a href="options.html#'binary'">'binary'</a> is set, also edited the help
file in binary mode.  Caused extra ^Ms for DOS systems.

Cursor position in a file was reset to 1 when closing a window.

":!ls" in Ex mode switched off echo.

When doing a double click in window A, while currently in window B, first
click would reset double click time, had to click three times to select a
word.

When using <code class="special">&lt;F11&gt;</code> in mappings, ":mkexrc" produced an exrc file that can't be
used in Vi compatible mode.  Added setting of <a href="options.html#'cpo'">'cpo'</a> to avoid this.  Also, add
a <code class="keystroke">CTRL-V</code> in front of a '&lt;', to avoid a normal string to be interpreted as a
special key name.

Gave confusing error message for ":set guifont=-*-lucida-*": first "font is
not fixed width", then "Unknown font".

Some options were still completely left out, instead of included as hidden
options.

While running the X11 GUI, ignore SIGHUP signals.  Avoids a crash after
executing an external command (in rare cases).

In os_unixx.h, signal() was defined to sigset(), while it already was.

Memory leak when executing autocommands (was reported as a memory leak in
syntax highlighting).

Didn't print source of error sometimes, because pointers were the same,
although names were different.

Avoid a number of UMR errors from Purify (third argument to open()).

A swap file could still be created just after setting <a href="options.html#'updatecount'">'updatecount'</a> to zero,
when there is an empty buffer and doing ":e file". (Kutschera)

Test 35 failed on 64 bit machines. (Schild)

With "p" and "P" commands, redrawing was slow.

Awk script for html documentation didn't work correctly with AIX awk.
Replaced "[ ,.);\]      ]" with "[] ,.);        ]". (Briscoe)
The makehtml.awk script had a small problem, causing extra lines to be
inserted. (Briscoe)

"gqgq" could not be repeated.  Repeating for "gugu" and "gUgU" worked in a
wrong way.  Also made "gqq" work to be consistent with "guu".

C indent was wrong after "case ':':".

":au BufReadPre *.c put": Line from put text was deleted, because the buffer
was still assumed to be empty.

Text pasted with the Edit/Paste menu was subject to <a href="options.html#'textwidth'">'textwidth'</a> and
<a href="options.html#'autoindent'">'autoindent'</a>.  That was inconsistent with using the mouse to paste.  Now "*p
is used.

When using <code class="keystroke">CTRL-W</code> <code class="keystroke">CTRL-]</code> on a word that's not a tag, and then <code class="keystroke">CTRL-]</code> on a tag,
window was split.

":ts" got stuck on a tags line that has two extra fields.

In Insert mode, with <a href="options.html#'showmode'">'showmode'</a> on, <code class="special">&lt;C-O&gt;</code><code class="special">&lt;C-G&gt;</code> message was directly
overwritten by mode message, if preceded with search command warning message.

When putting the result of an expression with "=<code class="special">&lt;expr&gt;</code>p, newlines were
inserted like ^@ (NUL in the file).  Now the string is split up in lines at
the newline.

putenv() was declared with "const char *" in pty.c, but with "char *" in
osdef2.h.in.  Made the last one also "const char *".

":help <code class="special">{word}</code>", where +<code class="special">{word}</code> is a feature, jumped to the feature list instead
of where the command was explained.  E.g., ":help browse", ":help autocmd".

Using the "\<code class="special">&lt;xx&gt;</code>" form in an expression only got one byte, even when using a
special character that uses several bytes (e.g., "\<code class="special">&lt;F9&gt;</code>").
Changed "\<code class="special">&lt;BS&gt;</code>" to produce <code class="keystroke">CTRL-H</code> instead of the special key code for the
backspace key.  "\<code class="special">&lt;Del&gt;</code>" produces 0x7f.

":mkvimrc" didn't write a command to set <a href="options.html#'compatible'">'compatible'</a> or <a href="options.html#'nocompatible'">'nocompatible'</a>.

The shell syntax didn't contain a "syn sync maxlines" setting.  In a long file
without recognizable items, syncing took so long it looked like Vim hangs.
Added a maxlines setting, and made syncing interruptible.

The "gs" command didn't flush output before waiting.

Memory leaks for:
    ":if 0 | let a = b . c | endif"
    "let a = b[c]"
    ":so <code class="special">{file}</code>" where <code class="special">{file}</code> contains a ":while"

GUI: allocated fonts were never released. (Leonard)

Makefile.bor:
- Changed $(DEFINES) into a list of "-D" options, so that it can also be used
  for the resource compiler. (not tested!)
- "bcc.cfg" was used for all configurations.  When building for another
  configuration, the settings for the previous one would be used.  Moved
  "bcc.cfg" to the object directory. (Geddes)
- Included targets for vimrun, install, ctags and xxd.  Changed the default to
  use the Borland DLL Runtime Library, makes Vim.exe a log smaller. (Aaron)

"2*" search for the word under the cursor with "2" prepended. (Leonard)

When deleting into a specific register, would still overwrite the non-Win32
GUI selection.  Now ""x"*P works.

When deleting into the "" register, would write to the last used register.
Now ""x always writes to the unnamed register.

GUI Athena: A submenu with a '.' in it didn't work.  E.g.,
":amenu Syntax.XY\.Z.foo lll".

When first doing ":tag foo" and then ":tnext" and/or ":tselect" the order of
matching tags could change, because the current file is different.  Now the
existing matches are kept in the same order, newly found matches are added
after them, not matter what the current file is.

":ta" didn't find the second entry in a tags file, if the second entry was
longer than the first one.

When using ":set si tw=7" inserting "foo <code class="special">{^P}</code>" made the "}" inserted at the
wrong position.  can_si was still TRUE when the cursor is not in the indent of
the line.

Running an external command in Win32 version had the problem that Vim exits
when the X on the console is hit (and confirmed).  Now use the "vimrun"
command to start the external command indirectly. (Negri)

Win32 GUI: When running an external filter, do it in a minimized DOS box.
(Negri)

":let" listed variables without translation into printable characters.

Win32 console: When resizing the window, switching back to the old size
(when exiting or executing an external command) sometimes failed. (Negri)
This appears to also fix a "non fixable" problem:
Win32 console in NT 4.0: When running Vim in a cmd window with a scrollbar,
the scrollbar disappeared and was not restored when Vim exits.  This does work
under NT 3.51, it appears not to be a Vim problem.

When executing BufDelete and BufUnload autocommands for a buffer without a
name, the name of the current buffer was used for <code class="special">&lt;afile&gt;</code>.

When jumping to a tag it reported "tag 1 of &gt;2", while in fact there could be
only two matches.  Changed to "tag 1 of 2 or more".

":tjump tag" did a linear search in the tags file, which can be slow.

Configure didn't find "LibXm.so.2.0", a Xm library with a version number.

Win32 GUI: When using a shifted key with ALT, the shift modifier would remain
set, even when it was already used by changing the used key.  E.g., "<code class="special">&lt;M-S-9&gt;</code>"
resulted in "&lt;M-S-(&gt;", but it should be "&lt;M-(&gt;". (Negri)

A call to ga_init() was often followed by setting growsize and itemsize.
Created ga_init2() for this, which looks better. (Aaron)

Function filereadable() could call fopen() with an empty string, which might
be illegal.

X Windows GUI: When executing an external command that outputs text, could
write one character beyond the end of a buffer, which caused a crash. (Kohan)

When using "*" or "#" on a string that includes '/' or '?' (when these are
included in <a href="options.html#'isk'">'isk'</a>), they were not escaped. (Parmelan)

When adding a ToolBar menu in the Motif GUI, the submenu_id field was not
cleared, causing random problems.

When adding a menu, the check if this menu (or submenu) name already exists
didn't compare with the simplified version (no mnemonic or accelerator) of the
new menu.  Could get two menus with the same name, e.g., "File" and "&amp;File".

Breaking a line because of <a href="options.html#'textwidth'">'textwidth'</a> at the last line in the window caused a
redraw of the whole window instead of a scroll.  Speeds up normal typing with
<a href="options.html#'textwidth'">'textwidth'</a> a lot for slow terminals.

An invalid line number produced an "invalid range" error, even when it wasn't
to be executed (inside "if 0").

When the unnamed, first buffer is re-used, the "BufDelete" autocommand was
not called.  It would stick in a buffer list menu.

When doing "%" on the NUL after the line, a "{" or "}" in the last character
of the line was not found.

The Insert mode menu was not used for the "s" command, the Operator-pending
menu was used instead.

With <a href="options.html#'compatible'">'compatible'</a> set, some syntax highlighting was not correct, because of
using "[\t]" for a search pattern.  Now use the regexps for syntax
highlighting like the <a href="options.html#'cpoptions'">'cpoptions'</a> option is empty (as was documented already).

When using "map <code class="special">&lt;M-Space&gt;</code> ms" or "map <code class="special">&lt;Space&gt;</code> sss" the output of ":map" didn't
show any lhs for the mapping (if <a href="options.html#'isprint'">'isprint'</a> includes 160).  Now always use
<code class="special">&lt;Space&gt;</code> and <code class="special">&lt;M-Space&gt;</code>, even when they are printable.

Adjusted the Syntax menu, so that the lowest entry fits on a small screen (for
Athena, where menus don't wrap).

When using <code class="keystroke">CTRL-E</code> or <code class="keystroke">CTRL-Y</code> in Insert mode for characters like 'o', 'x' and
digits, repeating the insert didn't work.

The file "tools/ccfilter.README.txt" could not be unpacked when using short
file names, because of the two dots.  Renamed it to
"tools/ccfilter_README.txt".

For a dark <a href="options.html#'background'">'background'</a>, using Blue for Directory and SpecialKey highlight
groups is not very readable.  Use Cyan instead.

In the function uc_scan_attr() in ex_docmd.c there was a goto that jumped into
a block with a local variable.  That's illegal for some compilers.

Win32 GUI: There was a row of pixels at the bottom of the window which was not
drawn. (Aaron)

Under DOS, editing "filename/" created a swap file of "filename/.swp".  Should
be "filename/_swp".

Win32 GUI: pointer was hidden when executing an external command.

When <a href="options.html#'so'">'so'</a> is 999, "J" near the end of the file didn't redisplay correctly.

":0a" inserted after the first line, instead of before the first line.

Unix: Wildcard expansion didn't handle single quotes and <code class="special">{}</code> patterns.  Now
":file 'window.c'" removes the quotes and ":e 'main*.c'" works (literal '*').
":file <code class="special">{o}</code><code class="special">{n}</code><code class="special">{e}</code>" now results in file name "one".

Memory leak when setting a string option back to its default value.

</section><hr class="doubleline" /><section class=inner>
<h4>5.3 版 本                                               <b class="vimtag"> <a name="version-5.3">version-5.3</a> </b></h4>
5.3 版本是 5.2 的漏洞修正版。改动不是很多。
5.2 和 5.3 之间的改进:

改动                                                    <b class="vimtag"> <a name="changed-5.3">changed-5.3</a> </b>
</section><hr class="singleline" /><section class=inner>

"IDE" 菜单更名为 "Tools" 菜单。


新增                                                    <b class="vimtag"> <a name="added-5.3">added-5.3</a> </b>
</section><hr class="singleline" /><section class=inner>

Win32 GUI: 激活 Vim 时如果发现已经开始的编辑文件被改变，给出<code class="note">警告</code>。(Negri)


修正                                                    <b class="vimtag"> <a name="fixed-5.3">fixed-5.3</a> </b>
</section><hr class="singleline" /><section class=inner>

5.2.1: Win32 GUI: space for external command was not properly allocated, could
cause a crash. (Aaron)  This was the reason to bring out 5.3 quickly after
5.2.

5.2.2: Some commands didn't complain when used without an argument, although
they need one: ":badd", ":browse", ":call", ":confirm", ":behave",
":delfunction", ":delcommand" and ":tearoff".
":endfunction" outside of a function gave wrong error message: "Command not
implemented".  Should be ":endfunction not inside a function".

5.2.3: Win32 GUI: When gvim was installed in "Program files", or another path
with a space in it, executing external commands with vimrun didn't work.

5.2.4: Pasting with the mouse in Insert mode left the cursor on the last
pasted character, instead of behind it.

5.2.5: In Insert mode, cursor after the end of the line, a shift-cursor-left
didn't include the last character in the selection.

5.2.6: When deleting text from Insert mode (with "<code class="special">&lt;C-O&gt;</code>D" or the mouse), which
includes the last character in the line, the cursor could be left on the last
character in the line, instead of just after it.

5.2.7: Win32 GUI: scrollbar was one pixel too big.

5.2.8: Completion of "PopUp" menu showed the derivatives "PopUpc", "PopUPi",
etc.  ":menu" also showed these.

5.2.9: When using two input() functions on a row, the prompt would not be
drawn in column 0.

5.2.10: A loop with input() could not be broken with <code class="keystroke">CTRL-C</code>.

5.2.11: ":call asdf" and ":call asdf(" didn't give an error message.

5.2.12: Recursively using ":normal" crashes Vim after a while.  E.g.:
":map gq :normal gq<code class="special">&lt;CR&gt;</code>"

5.2.13: Syntax highlighting used <a href="options.html#'iskeyword'">'iskeyword'</a> from wrong buffer.  When using
":help", then "/\k*" in another window with <a href="options.html#'hlsearch'">'hlsearch'</a> set.

5.2.14: When using ":source" from a function, global variables would not be
available unless "g:" was used.

5.2.15: XPM files can have the extension ".pm", which is the same as for Perl
modules.  Added "syntax/pmfile.vim" to handle this.

5.2.16: On Win32 and Amiga, "echo expand("%:p:h")" removed one dirname in an
empty buffer.  mch_Fullname() didn't append a slash at the end of a directory
name.

Should include the character under the cursor in the Visual area when using
<a href="options.html#'selection'">'selection'</a> "exclusive".  This wasn't done for "%", "e", "E", "t" and "f".

""p would always put register 0, instead of the unnamed (last used) register.
Reverse the change that ""x doesn't write in the unnamed (last used) register.
It would always write in register 0, which isn't very useful.  Use "-x for the
paste mappings in Visual mode.

When there is one long line on the screen, and <a href="options.html#'showcmd'">'showcmd'</a> is off, "0$" didn't
redraw the screen.

Win32 GUI: When using <a href="options.html#'mousehide'">'mousehide'</a>, the pointer would flicker when the cursor
shape is changed. (Negri)

When cancelling Visual mode, and the cursor moves to the start, the wanted
column wasn't set, "k" or "j" moved to the wrong column.

When using ":browse" or ":confirm", was checking for a comment and separating
bar, which can break some commands.

Included fixes for Macintosh. (Kielhorn)

</section><hr class="doubleline" /><section class=inner>
<h4>5.4 版 本                                               <b class="vimtag"> <a name="version-5.4">version-5.4</a> </b></h4>
5.4 版本引入了新特性、有用的改变、以及很多的漏洞修正。


引入运行时目录                                          <b class="vimtag"> <a name="new-runtime-dir">new-runtime-dir</a> </b>
</section><hr class="singleline" /><section class=inner>

现在，发布的运行时目录文件在 $VIMRUNTIME，即 $VIM 里的用户文件。
你通常不需要设置 $VIMRUNTIME，而应该让 Vim 去找。它使用 $VIM/vim<code class="special">{version}</code>，或
者如果那不存在， $VIM。这允许把用户文件和发布文件分离，使得版本更新更容易。这
也使保持两个不同版本的 Vim 成为可能，每个带有它自己的运行时文件。

在 Unix 发布里，运行时文件移到了 "runtime" 目录。这可以用来一次复制所有的运行
时文件，而不需了解需要复制什么。

DOS、Windows、Amiga 或 OS/2 的归档现在增加了额外的顶层 "vim" 目录。目的是清楚
的说明用户定义文件应该放在这里。包含可执行文件的目录不能有 '-' 或 '.' 字符，以
避免奇怪的扩展。

$VIM 和 $VIMRUNTIME 变量在第一次使用时定义。这使得它们，比如说，可以为 Perl 使
用。

运行时文件也在 "$VIM/runtime" 里寻找。这有助于在只有解压运行时文件归档之后就可
运行 Vim 的场合。如果用 "src" 目录里的可执行文件，Vim 检查该目录去掉 "src" 的
部分之后是否可以加上 "vim54" 或 "runtime"。这使得编译后立即找到运行时文件。

可以在 Unix Makefile 里指定 $VIMRUNTIME 的缺省值。这可以使得 $VIM 不指向上述的
运行时目录，而是，比如，"/etc/"。


引入文件类型                                            <b class="vimtag"> <a name="new-filetype-5.4">new-filetype-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

现在，语法文件使用新的 FileType 自动命令载入。旧的 "mysyntaxfile" 文件不再可
用。 <a href="filetype.html#filetypes">filetypes</a> 

载入语法高亮的脚本被修改，以使用新的 Syntax 自动命令事件。

Filetype 和 Syntax 事件的组合，包括 Syntax 菜单的选择，提供更好的语法高亮的微
调。FileType 事件也可以用来设置该文件类型特定的选项和映射。

"$VIMRUNTIME/filetype.vim" 文件不是自动载入的。为此目的，增加了 ":filetype on"
命令。":syntax on" 也载入此脚本。

加入了 <a href="options.html#'filetype'">'filetype'</a> 选项。它被用来激活 FileType 自动命令事件，就像 <a href="options.html#'syntax'">'syntax'</a> 选项
之于 Syntax 事件。

":set syntax=OFF" 和 ":set syntax=ON" 可以 (在模式行里) 开/关当前文件语法高
亮。

Syntax 菜单命令被移到了 $VIMRUNTIME/menu.vim。":filetype on" 和 ":syntax
manual" 都会打开 Syntax 菜单。

旧的 <a href="options.html#'filetype'">'filetype'</a> 选项改名为 <a href="options.html#'osfiletype'">'osfiletype'</a>。只有 RISCOS 使用它。<a href="options.html#'filetype'">'filetype'</a> 现在用
作通用的文件类型。

加入 ":syntax manual" 命令。允许手动选择，比如从模式行上，要加入的语法。


Vim 脚本续行符                                  <b class="vimtag"> <a name="new-line-continuation">new-line-continuation</a> </b>
</section><hr class="singleline" /><section class=inner>

如果 Ex 行以反斜杠开始，它被连接到上一行。这样，避免了长行的需要。
 <a href="repeat.html#line-continuation">line-continuation</a>  (Roemer)
例如: 
<code class="example">        if   has("dialog_con") ||</code>
<code class="example">           \ has("dialog_gui")</code>
<code class="example">            :let result = confirm("Enter your choice",</code>
<code class="example">                                \ "&amp;Yes\n&amp;No\n&amp;Maybe",</code>
<code class="example">                                \ 2)</code>
<code class="example">        endif</code>
<code class="example"></code>
<code class="example"></code>
改进会话文件                                    <b class="vimtag"> <a name="improved-sessions">improved-sessions</a> </b>
</section><hr class="singleline" /><section class=inner>

<a href="options.html#'sessionoptions'">'sessionoptions'</a> 的新单词:
- "help"        恢复帮助窗口。
- "blank"       恢复空窗口。
- "winpos"      恢复 Vim 窗口位置。使用新的 ":winpos" 命令。
- "buffers"     恢复隐藏和卸载的缓冲区。不使用它，只有窗口里的缓冲区会恢复。
- "slash"       把文件名里的反斜杠换成正斜杠。
- "globals"     保存全局变量。
- "unix"        使用 unix 文件格式 (<code class="special">&lt;NL&gt;</code> 代替 <code class="special">&lt;CR&gt;</code><code class="special">&lt;NL&gt;</code>)

":mksession" 和 <a href="options.html#'sessionoptions'">'sessionoptions'</a> 现在出现在 +mksession 特性里。

使用会话文件时，同时恢复窗口的顶行位置。

":mksession" 和 ":mkvimrc" 不保存 <a href="options.html#'fileformat'">'fileformat'</a>，应该在载入文件时会被检测到。

(多数工作有 Vince Negri 和 Robert Webb 完成)


改进自动命令                                    <b class="vimtag"> <a name="improved-autocmds-5.4">improved-autocmds-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

新事件:
 <a href="autocmd.html#FileType">FileType</a>       检测到文件类型时。
 <a href="autocmd.html#FocusGained">FocusGained</a>    Vim 得到输入焦点时。(Negri)
 <a href="autocmd.html#FocusLost">FocusLost</a>      Vim 失去输入焦点时。(Negri)
 <a href="autocmd.html#BufCreate">BufCreate</a>      新缓冲区刚建立或换名时调用。(Madsen)
 <a href="autocmd.html#CursorHold">CursorHold</a>     如果在 <a href="options.html#'updatetime'">'updatetime'</a> 时间内没有输入过键则激活。可以用来对光标所
                在的单词进行一些操作。(Negri)
                Unix 上实现了 CursorHold 自动命令事件。(Zellner)
                也适用于 Amiga 和 MS-DOS。
 <a href="autocmd.html#GUIEnter">GUIEnter</a>       可以用在刚建立 GUI 窗口时完成一些事情。(比如，
                ":winpos 100 50")。
 <a href="autocmd.html#BufHidden">BufHidden</a>      缓冲区被隐藏时。用于当选项窗口隐藏时，删除之。

同时，在缓冲区将要换名前，激活  <a href="autocmd.html#BufDelete">BufDelete</a> 。(Madsen)

自动命令里，"<code class="special">&lt;amatch&gt;</code>" 模式使用方法类似于 "<code class="special">&lt;afile&gt;</code>"，只不过它是 FileType 和
Syntax 事件的匹配值。

如果自动命令里使用了 ":let @/ = <code class="special">&lt;string&gt;</code>"，自动命令结束时会使用该最近搜索模
式。

使自动命令的载入速度稍快了一些。通过记住新模式的长度，避免在每个退出模式上都执
行 strlen()。


加密                                                    <b class="vimtag"> <a name="new-encryption">new-encryption</a> </b>
</section><hr class="singleline" /><section class=inner>

写入文件时可以加密，读入文件时可以解密。加入 <a href="options.html#'key'">'key'</a> 选项，"-x" 命令行参数和
":X" 命令。 <a href="editing.html#encryption">encryption</a>  (基于 Mohsin Ahmed 的补丁)

读入文件时，进行该文件是否加密的自动检测。Vim 这时会提示输入秘钥。

<code class="note">注意</code> 加密的方法和 Vi 不兼容。该加密方法不是不可破解的。这是为了满足能从美国出
口的条件。


GTK GUI 移植版本                                        <b class="vimtag"> <a name="new-GTK-GUI">new-GTK-GUI</a> </b>
</section><hr class="singleline" /><section class=inner>

新的 GTK+ 的 GUI 移植版本。包括工具栏、可撕下的菜单，等等。 <a href="gui_x11.html#gui-gtk">gui-gtk</a> 
加入  <a href="helphelp.html#:helpfind">:helpfind</a>  命令。(Kahn 和 Dalecki)


菜单改变                                                <b class="vimtag"> <a name="menu-changes-5.4">menu-changes-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

菜单现在可以控制台上使用。用新的 <a href="options.html#'wildmenu'">'wildmenu'</a> 选项可以打开。这会显示命令行补全的
匹配，就像菜单一样。它的工作方式如同一个小型的文件浏览器。

新的  <a href="gui.html#:emenu">:emenu</a>  命令可以用来执行菜单项。

使用最后的状态行列出项目，或者在命令行上方插入一行。(Negri)

<code class="badlink">'wildcharx'</code> 选项可以用在映射打开 <a href="options.html#'wildmenu'">'wildmenu'</a> 补全。

可以用 has("menu") 检测编译时是否不带菜单。也可以从 ":version" 的输出看到。可
以编译没有菜单支持的 GUI 版本。只有在有菜单支持时，才能包含工具栏支持。

把 "Window" 菜单一路移到右边 (优先级 70)。用 MS-Windows 工作的人会觉得更熟悉，
而其它的人应该也不会受到影响。

包含 "Buffers" 菜单。它使用现有的自动命令和函数。可以通过设置
"no_buffers_menu" 变量关闭。(Aaron 和 Madsen)

Win32 支持菜单里的分隔符: "-.*-"。(Geddes)
Motif 里现在也应该支持菜单分隔符。

使得 Motif GUI 的弹出式菜单能够工作。(Madsen)

<a href="options.html#'guioptions'">'guioptions'</a> 的 'M' 标志位: 不载入系统菜单。

所有的菜单代码从 gui.c 移到了 menu.c。


改进 Viminfo                                            <b class="vimtag"> <a name="improved-viminfo">improved-viminfo</a> </b>
</section><hr class="singleline" /><section class=inner>

<a href="options.html#'viminfo'">'viminfo'</a> 的新标志位:
'!'     如果全局变量以大写字母出现，保存在 viminfo 文件里。(Negri)
'h'     载入 viminfo 文件时，执行 ":nohlsearch"。

viminfo 文件保存搜索模式的位移、magic 与否，等等。同时保存 <a href="options.html#'hlsearch'">'hlsearch'</a> 高亮是否
打开的标志位 (如果 <a href="options.html#'viminfo'">'viminfo'</a> 有 'h' 标志位，不使用该记录)。

如果设置 <a href="options.html#'viminfo'">'viminfo'</a> 的时候没有逗号，给出错误信息。


若干新命令                                              <b class="vimtag"> <a name="new-commands-5.4">new-commands-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

操作符  <a href="change.html#g?">g?</a> : rot13 编码。(Negri)

 <a href="scroll.html#zH">zH</a>  和  <a href="scroll.html#zL">zL</a>  命令: 水平滚动半页。
 <a href="motion.html#gm">gm</a>  移动光标到屏幕行的中间。(Ideas by Campbell)

可视列块上的操作:  <a href="visual.html#v_b_I">v_b_I</a> 、 <a href="visual.html#v_b_A">v_b_A</a> 、 <a href="visual.html#v_b_c">v_b_c</a> 、 <a href="visual.html#v_b_C">v_b_C</a> 、 <a href="visual.html#v_b_r">v_b_r</a> 、 <a href="visual.html#v_b_%3C">v_b_&lt;</a>  和
 <a href="visual.html#v_b_%3E">v_b_&gt;</a> 。(Kelly)

新命令: <code class="keystroke">CTRL-\</code> <code class="keystroke">CTRL-N</code>，在普通模式里不作任何事，在插入或命令行模式里进入普通模
式。可以在 VisVim 或其它 OLE 程序里使用，确保 Vim 在普通模式里，而且不会响铃。
 <a href="intro.html#CTRL-\_CTRL-N">CTRL-\_CTRL-N</a> 

":cscope kill" 命令使用连接文件名。 <a href="if_cscop.html#:cscope">:cscope</a>  (Kahn)

 <a href="insert.html#:startinsert">:startinsert</a>  命令: 下一步启动插入模式。

 <a href="cmdline.html#:history">:history</a>  命令，显示所有四种类型的历史。(Roemer)

 <a href="motion.html#[m">[m</a> 、 <a href="motion.html#[M">[M</a> 、 <a href="motion.html#]m">]m</a>  和  <a href="motion.html#]M">]M</a>  命令，反向/正向跳转到 (Java) 类的方法的开始/结束处。

":@*" 执行 * 寄存器。 <a href="repeat.html#:@">:@</a>  (Acevedo)

 <a href="motion.html#go">go</a>  和  <a href="motion.html#:goto">:goto</a>  命令: 根据文件的字节偏移跳转。

 <a href="change.html#gR">gR</a>  and  <a href="change.html#gr">gr</a>  命令: 虚拟替换模式。替换字符，而不改变布局。(Webb)

":cd -" 回到上一次 ":cd" 命令之前的目录。 <a href="editing.html#:cd-">:cd-</a>  (Webb)

标签预览命令  <a href="windows.html#:ptag">:ptag</a> 。在单独的窗口里显示 ":tag" 的结果。可以用来显示标签的上下
文 (比如，函数参数)。(Negri)
 <a href="windows.html#:pclose">:pclose</a>  命令和 <code class="keystroke">CTRL-W</code> <code class="keystroke">CTRL-Z</code>: 关闭预览窗口。(Moore)
<a href="options.html#'previewheight'">'previewheight'</a> 选项，预览窗口的高度。
还有  <a href="windows.html#:ppop">:ppop</a> 、 <a href="tagsrch.html#:ptnext">:ptnext</a> 、 <a href="tagsrch.html#:ptprevious">:ptprevious</a> 、 <a href="tagsrch.html#:ptNext">:ptNext</a> 、 <a href="tagsrch.html#:ptrewind">:ptrewind</a> 、 <a href="tagsrch.html#:ptlast">:ptlast</a> 。

 <a href="editing.html#:find">:find</a>  和  <a href="windows.html#:sfind">:sfind</a>  命令: 找到 <a href="options.html#'path'">'path'</a> 里的文件，(分割窗口) 并编辑之。

 <a href="options.html#:options">:options</a>  命令打开选项窗口，显示当前的选项值。或者使用 ":browse set" 来打开。
选项按功能分组。提供每个选项简短的帮助。按 <code class="special">&lt;CR&gt;</code> 可以得到更多的帮助。编辑选项
值，然后在 "set" 行按 <code class="special">&lt;CR&gt;</code> 可以设置新值。


若干新选项                                              <b class="vimtag"> <a name="new-options-5.4">new-options-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

滚动绑定: <a href="options.html#'scrollbind'">'scrollbind'</a> 和 <a href="options.html#'scrollopt'">'scrollopt'</a> 选项。加入  <a href="scroll.html#:syncbind">:syncbind</a>  命令。使得窗口滚
动相同的量 (水平和/或垂直)。(Ralston)

MS-DOS 的 <a href="options.html#'conskey'">'conskey'</a> 选项。使用直接的控制台输入/输出。应该能用于 telnet (没有测
试过！)。

<a href="options.html#'statusline'">'statusline'</a> 选项: 可以配置的状态行内容。也可以显示文件的字节偏移。可以使用
%1* 到 %9* 高亮，它们使用新的高亮组 User1 到 User9。(Madsen)

<a href="options.html#'rulerformat'">'rulerformat'</a> 选项: 可以配置的标尺内容，类似于 <a href="options.html#'statusline'">'statusline'</a>。(Madsen)

<a href="options.html#'write'">'write'</a> 选项: 如果关闭，不允许写入文件。避免覆盖文件，即使是 ":w!" 也适用。
 <a href="starting.html#-m">-m</a>  命令行选项复位 <a href="options.html#'write'">'write'</a>。

<a href="options.html#'clipboard'">'clipboard'</a> 选项: 如果使用剪贴板。值 "unnamed": 就像 "* 那样使用无名寄存器。
(Cortopassi)  值 "autoselect": 就像 <a href="options.html#'guioptions'">'guioptions'</a> 里的 'a' 一样，但也能在终端上
工作。

<a href="options.html#'guifontset'">'guifontset'</a> 选项: 指定 +fontset 特性的字体，用于 X11 GUI 版本。在用这个特性编
译 vim 时，可以指定普通所用的字体。(Nam)

<a href="options.html#'guiheadroom'">'guiheadroom'</a> 选项: 允许 GUI 窗口之上/下保留多少空间。用于 Motif、Athena 和
GTK。

实现了 <a href="options.html#'tagstack'">'tagstack'</a> 选项: 如果关闭，不允许把标签放到堆栈上 (Vi 兼容)。对映射有
用。

<a href="options.html#'shellslash'">'shellslash'</a> 选项。只用于使用反斜杠作为文件分隔符的系统。该选项会在扩展文件名
时在文件名里使用正斜杠。可在 <a href="options.html#'shell'">'shell'</a> 为 sh 或 csh 时使用。

<a href="options.html#'pastetoggle'">'pastetoggle'</a> 选项: 切换 <a href="options.html#'paste'">'paste'</a> 的键序列。解决 <a href="options.html#'paste'">'paste'</a> 置位时，映射在插入模式
下不工作的问题。

<a href="options.html#'display'">'display'</a> 选项: 如果设为 "lastline"，末行填充窗口，而不是用 "@" 行代替。只
有最后三个字符被 "@@@" 代替，指示该行尚未完成。

<a href="options.html#'switchbuf'">'switchbuf'</a> 选项: 允许重用已有的被跳转到的缓冲区所在窗口，否则分割窗口，以打开
新的缓冲区。(Roemer)

<a href="options.html#'titleold'">'titleold'</a> 选项。替换固定的字符串 "Thanks for flying Vim"，用来在退出时设置标
题。


Vim 脚本                                                <b class="vimtag"> <a name="new-script-5.4">new-script-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

 <a href="builtin.html#exists()">exists()</a>  函数也可以检查函数是否存在。(Roemer)
现在用二分法查找内部函数，应该会快一些。(Roemer)

新函数:
-  <a href="builtin.html#getwinposx()">getwinposx()</a>  和  <a href="builtin.html#getwinposy()">getwinposy()</a> : 得到 Vim 窗口位置。(Webb)
-  <a href="builtin.html#histnr()">histnr()</a> 、 <a href="builtin.html#histadd()">histadd()</a> 、 <a href="builtin.html#histget()">histget()</a>  和  <a href="builtin.html#histdel()">histdel()</a> : 提供历史。(Roemer)
-  <a href="builtin.html#maparg()">maparg()</a> : 返回映射的右边。基于 Vikas 的补丁。
-  <a href="builtin.html#mapcheck()">mapcheck()</a> : 检查映射是否匹配已有的名字。
-  <a href="builtin.html#visualmode()">visualmode()</a> : 返回最近的可适模式的类型。(Webb)
-  <a href="builtin.html#libcall()">libcall()</a> : 调用库里的函数，目前只适用于 Win32。(Negri)
-  <a href="builtin.html#bufwinnr()">bufwinnr()</a> : 寻找包含指定缓冲区的窗口。(Roemer)
-  <a href="builtin.html#bufloaded()">bufloaded()</a> : 缓冲区是否存在且载入。
-  <a href="builtin.html#localtime()">localtime()</a>  和  <a href="builtin.html#getftime()">getftime()</a> : 包装时钟时间和文件最近的修改时间 (Webb)
-  <a href="builtin.html#glob()">glob()</a> : 只扩展文件名通配符。
-  <a href="builtin.html#system()">system()</a> : 得到外部命令的原始输出。(基于 Aaron 的补丁)。
-  <a href="builtin.html#strtrans()">strtrans()</a> : 翻译字符串成为可显示的字符。用于 2html.vim 脚本。
-  <a href="builtin.html#append()">append()</a> : 缓冲区附加文本行的简易方法。

函数改动:
-  <a href="builtin.html#strftime()">strftime()</a>  可选参数，给出以秒数计的时间。(Webb)
-  <a href="builtin.html#expand()">expand()</a>  现在也返回不存在文件的文件名。

允许用户命令名有数字。(Webb)

Vim 的内部变量使用 "v:": "v:errmsg"、"v:shell_error" 等。为了后相兼容，来自
5.3 版本的那些可以不用 "v:"。

新变量:
"v:warningmsg" 和 "v:statusmsg" 内部变量。包含最近给出的<code class="note">警告</code>和状态信息。
 <a href="eval.html#v:warningmsg">v:warningmsg</a>   <a href="eval.html#v:statusmsg">v:statusmsg</a>  (Madsen)
"v:count1" 变量: 类似于 "v:count"，但如果没有给出计数时，缺省为一。 <a href="eval.html#v:count1">v:count1</a> 

如果编译时不带表达式计算，"if 1" 可以用来包围不支持的命令，以免它们被执行。和
Vim 4.x 类似。
在使用以最小特性包编译的 Vim 时，有些运行时脚本会出错。现在，"if 1" 可以用来包
围不总被支持的代码。

如果计算带 &amp;&amp; 和 || 表达式，忽略不会影响结果的部分。这样速度更快，而且避免错误
信息。(Webb)
同时对跳过 "if 0" 里的表达式进行优化。


避免 hit-enter 提示                                     <b class="vimtag"> <a name="avoid-hit-enter">avoid-hit-enter</a> </b>
</section><hr class="singleline" /><section class=inner>

加入 <a href="options.html#'shortmess'">'shortmess'</a> 的 'T' 标志位: 截短所有会产生 hit-enter 提示的消息 (除了总会
发生的那些)。
<a href="options.html#'shortmess'">'shortmess'</a> 的 'O' 标志位现在也适用于快速修复消息，比如，从 ":cn" 命令那里。

<a href="options.html#'shortmess'">'shortmess'</a> 的缺省值现在是 "filnxtToO"，使得多数消息能放在命令行上，而不需要
hit-enter 提示。

以前的消息可以用新的  <a href="message.html#:messages">:messages</a>  命令看到。

即使 <a href="options.html#'shortmess'">'shortmess'</a> 指示要缩短消息，有些消息仍然被完整显示，因为用户期待完整地看
到它们: <code class="keystroke">CTRL-G</code> 和一些快速修复命令。


改进快速修复                                    <b class="vimtag"> <a name="improved-quickfix">improved-quickfix</a> </b>
</section><hr class="singleline" /><section class=inner>

分析 gmake 的改变目录行: "make[1]: Entering directory <code class="badlink">'name'</code>"。
使用 <a href="options.html#'errorformat'">'errorformat'</a> 的 "%D" 和 "%X"。
同时分析 make 的 "Making <code class="special">{target}</code> in <code class="special">{dir}</code>" 消息。有助于不使用 GNU make 的场
合。(Schandl)

<a href="options.html#'errorformat'">'errorformat'</a> 的 "%f" 使用 <a href="options.html#'isfname'">'isfname'</a>。

分析多行消息。 <a href="quickfix.html#errorformat-multi-line">errorformat-multi-line</a> 

允许  <a href="quickfix.html#:clist">:clist</a>  命令指定行范围。(Roemer)

支持 "全局" 文件名，用于为多个错误输出一次文件名的错误格式。(Roemer)

 <a href="quickfix.html#:cnfile">:cnfile</a>  跳转到下一个文件的第一个错误。

<a href="options.html#'makeprg'">'makeprg'</a> 里的 "$*" 被 ":make" 的参数替换。(Roemer)


正则表达式                                              <b class="vimtag"> <a name="regexp-changes-5.4">regexp-changes-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

正则表达式里，"\)" 之前的 '$' 被认为是一行的结束。 <a href="pattern.html#%2F$">/$</a> 
模式里，"\|" 或 "\(" 之后的 "^" 被认为是一行的开始。 <a href="pattern.html#%2F^">/^</a>  (Robinson)

正则表达式里，在 "\)" 和 "\|" 的前面，"$" 和 "\$" 过去都被认为是一行的结束。现
在，"$" 用作行尾而 "\$" 用作按本义出现的美元符号。这同样适用于 "\(" 和 "\|" 之
后的 '^'。 <a href="pattern.html#%2F\$">/\$</a>   <a href="pattern.html#%2F\^">/\^</a> 

有些搜索模式即使它们实际上并不是不合法，但它们可能非常慢。比如:
"\([^a-z]\+\)\+Q"。用 <code class="keystroke">CTRL-C</code> 可以中止任何正则表达式的搜索。

寄存器 "/: 最近的搜索字符串 (只读)，(Kohan) 被改变为最近使用的搜索模式 (就像
<a href="options.html#'hlsearch'">'hlsearch'</a> 用的一样)。可以这样设置搜索模式 ":let @/ = <code class="special">{expr}</code>"。

搜索模式里，加入字符类，以避免从 <a href="options.html#'cpoptions'">'cpoptions'</a> 里去除 'l' 标志位的需要:
 <a href="pattern.html#[:tab:]">[:tab:]</a> 、 <a href="pattern.html#[:return:]">[:return:]</a> 、 <a href="pattern.html#[:backspace:]">[:backspace:]</a>  和  <a href="pattern.html#[:escape:]">[:escape:]</a> 。

在表达式的比较操作符之后加入 '?' 可以使该比较忽略大小写。 <a href="eval.html#expr-%20%20?">expr-==?</a> 


其它 5.3 和 5.4 版本之间的改进
</section><hr class="singleline" /><section class=inner>

改动                                                    <b class="vimtag"> <a name="changed-5.4">changed-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

Unix: 如果 $TMPDIR 设置且存在，用来存放临时文件。

删除 "Empty buffer" 信息。它没有用而且会产生 hit-enter 提示。(Negri)

"ex -" 现在从标准输入读入命令并以安静模式工作。和原来用于脚本的的 "ex" 命令兼
容。

":tcldo" 的缺省范围是整个文件。

用 ESC 撤销可视模式过去移动光标。看来没有理由这么做。现在光标留在原来的位置。

":grep" 和 ":make" 命令把 " 看成参数的一部分，而不是注释的开始。

表达式里 "=~" 和 "!~" 操作符不再受 <a href="options.html#'ignorecase'">'ignorecase'</a> 影响。

vimrc_example 换名为 vimrc_example.vim 而 gvimrc_example 换名为
gvimrc_example.vim。使它们能识别为 vim 脚本。

"gd" 不再从前一个函数的尾部开始搜索，而是从当前函数的开始处的之前的第一个空白
行开始。避免在第一个函数上使用 "gd" 找到的是全局变量。

<a href="options.html#'complete'">'complete'</a> 的缺省值从 ".,b" 改为 ".,w,b,u,t,i"。能找到许多其它匹配，代价是时间
长一点 (但搜索可以中断)。

模式行上不再能设置 'shell*' 选项。以前只会给出<code class="note">警告</code>。这样做减少了安全风险。

文档文件的索引顺序进行调整，以便更容易寻找某一主题。

MS-DOS 和 win32 上如果没有设置 $VIM，过去使用 $HOME。如果 $HOME 因为其它工具的
缘故而设为，比如说，"C:\"，这会引起问题，因为会找不到运行时文件。现在 $HOME 只
用来寻找 _vimrc、_gvimrc 等，而不用来寻找运行时文件。

如果 <a href="options.html#'tags'">'tags'</a> 为 "./<code class="special">{fname}</code>" 而当前缓冲区没有文件名，就这么用。过去它被跳过，使
得 "vim -t <code class="special">{tag}</code>" 找不到许多标签。

在 <a href="options.html#'scrolloff'">'scrolloff'</a> 区域如果用拖动试图选择文本，产生的滚动使之十分困难。现在暂时把
<a href="options.html#'scrolloff'">'scrolloff'</a> 设为 0 或 1，以避免这一问题。但在顶行上还是允许滚动，以扩展到显示
的文本范围之上。

<a href="options.html#'comments'">'comments'</a> 的缺省值现在包含 "sl:/*,mb: *,ex:*/"，使 Javadoc 注释可用。也有助于
"/*******" 开始的 C 注释。

<code class="keystroke">CTRL-X</code> <code class="keystroke">CTRL-]</code> 插入模式标签扩展在非 ID 字符之后试图扩展所有的标签，这样要花很长
时间。现在限制为 200 个匹配。也用于命令行的标签补全。

OS/2 发布被分为两个文件。不然太大以致于在一张软盘上放不下。现在使用和 PC 相同
的运行时归档。

文档里，非可选参数的 <code class="special">&lt;a-z&gt;</code> 项目被 <code class="special">{a-z}</code> 替换。这样避免了和键名 <code class="special">&lt;C-Z&gt;</code> 的冲突，
后者代表 <code class="keystroke">CTRL-Z</code> 而不是 C 到 Z 之间的字符，那应该用 <code class="special">{C-Z}</code>。


新增                                                    <b class="vimtag"> <a name="added-5.4">added-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

iris-ansi 内建 termcap 项目的色彩支持。(Tubman)

加入 VisVim 1.3a 版本。(Erhardt)

SNiFF+ 接口的 Win32 移植版本。(Leherbauer)
SniFF 接口文档: if_sniff.txt。(Leherbauer)

在 OleVim 目录里包含 "SendToVim" 和 "OpenWithVim" 程序。用于 MS-Windows 上的
OLE 版本的 gvim。(Schaller)

包含 Exuberant Ctags 3.2.4 版本，提供 Eiffel 支持。(Hiebert)

如果删除了正在编辑中文件，给出<code class="note">警告</code> (就像改变修改时间一样)。

包含新版本生成 HTML 的 Awk 和 Perl 脚本。(Colombo)

基于 "gpm" 的 Linux 控制台鼠标支持。(Tsindlekht)

安全修正: 不允许从模式行改变 <a href="options.html#'secure'">'secure'</a> 和 <a href="options.html#'exrc'">'exrc'</a>。如果置位 <a href="options.html#'secure'">'secure'</a>，修改包含程
序名的选项时给出<code class="note">警告</code>。

Perl 接口支持 Perl 5.005 和线程。(Verdoolaege)

给出关于二义性映射的错误信息时，同时包含引起问题的映射。(Roemer)

命令行编辑:
- 命令行的映射补全。(Roemer)
- 命令行 ":function"、":delfunction"、":let"、":call"、":if" 等的补全。
  (Roemer)
- 使用 <code class="keystroke">CTRL-D</code> 对有 "-complete=tag_listfiles" 的用户命令进行补全时同时列出文件
  名。(Madsen)
- 补全 ":command" 命令的参数。(Webb)
- 命令行的 <code class="keystroke">CTRL-R</code> . 插入最近插入的文本。<code class="keystroke">CTRL-R</code> 之后的 <code class="keystroke">CTRL-F</code>、<code class="keystroke">CTRL-P</code>、<code class="keystroke">CTRL-W</code>
  和 <code class="keystroke">CTRL-A</code> 用于插入光标所在的对象。(Madsen)

uganda.txt 的文本关于复制 Vi 的部分更加明确。

更新 Vim 教程。增加 "vimtutor" 命令，它复制了教程并启动 Vim 显示该教程。
"make install" 现在也复制教程。

":clist" 的输出使用 'i' 高亮方式高亮当前项目 (和 <a href="options.html#'incsearch'">'incsearch'</a> 所用的相同)。

":clist" 命令可以用 "b" 往回滚动 (一整屏)、"u" (半屏) 和 "k" (一行)。

多字节支持:
- 多字节字符的 X 输入法。多字节支持的其它一些修正。(Nam)
- 韩语输入法特性:  <a href="hangulin.html#hangul">hangul</a> 。(Nam)
- 清理了多字节支持、XIM、字体集和韩语输入的配置。现在每项可以单独配置。
- 修改 GTK_KEYBOARD 的检查为对 HANGUL_KEYBOARD_TYPE 的检查。(Nam)
- 加入 doc/hangulin.txt: 韩语输入代码的文档。(Nam)
- GTK+ 的 XIM 支持。(Nam)
- 包含 SJTS 编码支持的第一次尝试。(Nagano)
- 如果多字节字符在行尾放不下，在那里放上 "~" 然后在下一行显示。
- 优化了多字节文本的输出。(Park)
- Win32 IME: 预编辑风格相当于 over-the-spot。(Nagano)
- Win32 IME: IME 模式的改变现在使用 ImmSetOpenStatus。(Nagano)
- GUI Athena: 文件选择对话框现在可以显示多字节字符。(Nagano)
- XA_TEXT 的选择区应答是 XA_STRING。(Nagano)

"runtime/macros/diffwin.vim"。建立比较窗口的映射。(Campbell)

<a href="options.html#'suffixes'">'suffixes'</a> 选项加入 ".obj"。

用 ":SynAu" 用户命令，减小了 syntax/synload.vim 的长度。
menu.vim 自动给 Syntax 菜单项目编号。
Syntax 菜单中为开头字母不同的语法名之间插入分隔符。(Geddes)

xterm:
- 在 xterm 里使用鼠标时提供剪贴板支持。(Madsen)
- 使用 xterm 鼠标时，跟踪鼠标的拖动。如有可能，使用 xterm 转义序列，比其它方法
  要精确，但需要相当新的 xterm 版本。<a href="options.html#'ttymouse'">'ttymouse'</a> 设为 "xterm2" 打开这一功能。
  (Madsen)
- 检查 xterm 的补丁号以设置 <a href="options.html#'ttymouse'">'ttymouse'</a>。只用于最新的 xterm (补丁号 &gt; 95)。使用
  新的 <a href="term.html#'t_RV'">'t_RV'</a> termcap 选项。如果能够识别应答为正确，设置 <a href="options.html#'ttymouse'">'ttymouse'</a> 为
  "xterm2"。这样 xterm 鼠标的拖动工作得更好。
- 支持 xterm 上 shift + 功能键。修改 shift + 光标键为 xterm 实际产生的值。加入
  shift + <code class="special">&lt;End&gt;</code> 和 <code class="special">&lt;Home&gt;</code> 的编码。
- 加入 <a href="term.html#'t_WP'">'t_WP'</a>，像素计的窗口位置，和 <a href="term.html#'t_WS'">'t_WS'</a>，字符计的窗口大小。xterm 现在可以移
  动 (用于 ":winpos") 和调整大小 (用于 ":set lines=" 和 ":set columns=")。

X11:
- 可视模式下如果没有拥有选择区，使用 VisualNOS 组显示可视区域。(Madsen)
- 支持剪贴板支持类型的请求。用于 AIX 和 dtterm。(Wittig)
- 支持 compound_text 选择 (即使编译时没有多字节支持)。

交换文件:
- 交换文件命名的新变化: 把路径分隔符替换为 %，把所有的交换文件都放在一个目录。
  如果 <a href="options.html#'dir'">'dir'</a> 的某个名字以两个路径分隔符结尾时有用。(Madsen)
- 如果找到交换文件，相关信息里显示它是否包含了修改。(Madsen)
- 如果支持对话框，交换文件已存在时使用对话框询问用户应该如何做。

<a href="options.html#'mousemodel'">'mousemodel'</a> 选项的 "popup_setpos"。允许使用鼠标右键时移动光标。

如果删除缓冲区，要显示的缓冲区现在变成了跳转表的最近的项目。(Madsen)

用 <code class="keystroke">CTRL-O</code>/<code class="keystroke">CTRL-I</code> 跳过删除的缓冲区。

标尺里如有空间，显示百分比。

用 autoconf 1.13 生成 configure。

包含 Dirk van Deun 的 get_lisp_indent()。如果 <a href="options.html#'cpoptions'">'cpoptions'</a> 不包含 'p' 标志位，
提供更好的 Lisp 缩进。

2html.vim 脚本加快不少。(基于 Geddes 的建议)

Unix:
- version 消息里包含了编译 Vim 的用户名和使用的系统名。
- "make install" 现在也安装 "tools" 目录。使得所有人都能用它们。
- "make check" 现在和 "make test" 相同。"make test" 检查可视列块模式的左右移、
  插入、替换和修改。
- 加快文件名和已有缓冲区的比较速度。方法是保存缓冲区的 device/inode 号。
- configure 参数 "--disable-gtk"、"--disable-motif" 和 "--disable-athena"，关
  闭特定的 GUI (如果不能用)。
- 换名 configure 关闭检查特定 GUI 的参数。现在更清楚。(Kahn)
- Digital Unix 系统上 ("OSF1")，在 termlib 和 termcap 之前检查 curses 库。
  (Schild)
- "make uninstall_runtime" 只会删除特定版本的文件。可以用于删除以前版本的运行
  时文件。

Macintosh: (St-Amant)
- 拖动滚动条的行为类似于 Win32 GUI。把 gui_w32.c 的公共代码移到 gui.c。
- 加入对话框和文件浏览。
- 保留资源分叉 (resource fork)，如果丢失给出<code class="note">警告</code>。
- 复制原始文件的属性到新写入的文件。
- 已修正设置 title/notitle 的漏洞。
- 改进了文件名补全。
- Grow box 的限制调整为基于字符的大小。
- 用 rgb.txt 提供更多颜色 (但不能用的颜色又回来了)。
- Apple 菜单能用了 (除了 about...)。
- 内部边界现在和 vim 相容。
- 删除菜单不再崩溃。
- Python 1.5.1 的弱连接 (只用于 PPC)。需要库来提供 Python 的支持。
- 执行用户 .vimrc 文件时如果出错，现在立即显示<code class="note">警告</code>窗口，缺省按钮为 OK，每行的
  开头不再有 "Delete" 键的符号。
- 更好地管理环境变量。现在 $VIM 只计算一次，而不是每次使用时都重新生成。
- 后台运行时不再大量占用 CPU。
- 用于执行的 Vim 脚本可以识别 Mac 的文件格式，就像 DOS 文件格式那样。

如果 <a href="options.html#'fileformats'">'fileformats'</a> 里同时有 "unix" 和 "mac" 并且 CR 比 NL 字符多，优先选择
"mac" 格式。
用 "mac" 文件格式时用 CR 代替 NL，因为 NL 用作 NUL。文件的所有字符必须都保留下
来。(Madsen)

DOS install.exe 现在对已存在的安装进行检查。避免重复设置 $VIM 和 $PATH。
Dos/Windows 的安装程序现在可以通过加入两个注册表键来安装 Vim 到弹出菜单。

EGCS/mingw32 的移植。新的 Makefile.ming。(Aaron)

DOS 16 位: 不包含光标形状的代码。节省一些字节。

TCL 支持加入 Makefile.w32。(Duperval)

OS/2: 用 argv[0] 来寻找运行时文件。

用 "gf" 转到已经使用的缓冲区时，跳转到上次光标所在的行。

为 ":tselect" 的输出提供更多的颜色。用不同的高亮区别标签名和文件名。
("struct:") 字段名的高亮和参数也进行区隔。

非 Unix 系统的反引号扩展。基于 Aaron 的补丁。允许用 ":n `grep -l test *.c`" 和
"echo expand('`ls m*`')"。

设置时检查 <a href="options.html#'complete'">'complete'</a> 选项。(Acevedo)
<a href="options.html#'complete'">'complete'</a>  的 'd' 标志位检查宏定义的名字。
插入模式搜索头文件和标签文件的补全时，检查预输入，从而可以早匹配。(Webb)
<a href="options.html#'complete'">'complete'</a> 的 '.' 标志位现在完全扫描当前缓冲区，不依赖 <a href="options.html#'nowrapscan'">'nowrapscan'</a>。(Webb)

<a href="options.html#'whichwrap'">'whichwrap'</a> 加入 '~' 标志位。(Acevedo)

结束可视模式时 (例如用 ESC)，不夺取选择区的所有权。

彩色终端里，可用 "fg" 和 "bg" 作颜色名。它们分别代表 "Normal" 的两种颜色。

一些 cscope 的清理。(Kahn)

包含 Schemenauer 提供的 vimspell.sh 修改。

表达式里用 "." 进行字符串连接的速度稍稍加快。(Roemer)

":redir" 命令现在可以重定向到寄存器: ":redir @r". (Roemer)

":marks" 现在和 ":jumps" 的输出格式类似，如果位置标记位于当前文件，显示它之后
的文本。":tags" 亦然。

如果 configure 能找到 ftello() 和 fseeko()，在 tag.c 里使用 (如果你有非常庞大
的标签文件时有用)。

configure 检查编译器的 "-FOlimit,2000" 参数。(Borsenkow)

GUI:
- 在非 GUI 的 Vim 上使用 ":gui" 给出清楚的错误信息。
- "gvim -v" 不启动 GUI (如果支持终端的话)。
- Ex 模式里，使用整屏的非可视选择。
- 以 "gvim -f" 启动并在 .gvimrc 文件里使用 ":gui" 时，Vim 过去仍然进行分叉
  (fork)。现在记住了 "-f" 标志位并用于 ":gui"。加入 "gui -b" 使得 gvim 总在后
  台运行。

Motif GUI:
- configure 检查 "-lXp" 库 (但还不能用 ...)。
- configure 在 "/usr/local/Lesstif/Motif*" 检查 Lesstif。修改顺序使 local 的
  Motif 版本能覆盖系统标准版本。

Win32 GUI:
- 非 OLE 版本使用 "-register" 或 "-unregister" 报错。
- 使用 GTK 工具栏图标。使窗口边界看起来舒服点。窗口左下/右下角使用可改变大小的
  指针。(Negri)
- 用 ":!start" 启动外部命令但不能执行该命令时报错。(Webb)
- 滚动条下方的灰色矩形上使用可改变大小的指针。用平坦模式来画工具栏。这样看起
  来舒服点。(Negri)
- 为 MS-Windows 3.1 的加入做好准备。主要把 WIN32 改为 MSWIN，USE_GUI_WIN32 改
  为 USE_GUI_MSWIN。(Negri)

buflist_findpat() 里不要分配相同的字符串四次。(Williams)

用 termcap 选项 <a href="term.html#'t_ts'">'t_ts'</a>、<a href="term.html#'t_fs'">'t_fs'</a>、<a href="term.html#'t_IS'">'t_IS'</a> 和 <a href="term.html#'t_IE'">'t_IE'</a> 设置标题和图标文本。支持任何
支持设置标题和/或图标文本的终端。(Schild)

<a href="options.html#'comments'">'comments'</a> 的新 'x' 标志位: 输入结尾字符串的最后一个字符时，自动插入结尾部分。
有助于结束 C 的 /* */ 注释。(Webb)

expand() 有第二个参数且非零时，不用 <a href="options.html#'suffixes'">'suffixes'</a> 和 <a href="options.html#'wildignore'">'wildignore'</a>，返回所有匹配。

<a href="options.html#'cpoptions'">'cpoptions'</a> 的 'O' 标志位: 如果不包含，那么当文件在编辑开始时不存在但缓冲区写
回时却存在的时候，Vim 不会覆盖文件。文件一定在 Vim 之外被建立，用户自己都不一
定意识到这一点。如果在外壳命令之后发现这一点，给出<code class="note">警告</code>。

编辑新文件时，<code class="keystroke">CTRL-G</code> 显示 [New file]。读入文件如果有错，<code class="keystroke">CTRL-G</code> 显示 [Read
errors]。

":wall" 现在可以在需要时使用对话框和文件浏览。

组合若干功能成为新的特性，这样做的主要目的是为了能控制最小版本的大小:
+linebreak:     <a href="options.html#'showbreak'">'showbreak'</a>、<a href="options.html#'breakat'">'breakat'</a> 和 <a href="options.html#'linebreak'">'linebreak'</a>
+visualextra:   可视列块模式的插入 ("I") 和附加 ("A")、在列块所有行上修改
                ("c")、"&gt;" 和 "&lt;": 左/右移列块、"r": 用单个字符替换可视区域。
+comments:      <a href="options.html#'comments'">'comments'</a>
+cmdline_info:  <a href="options.html#'ruler'">'ruler'</a> 和 <a href="options.html#'showcmd'">'showcmd'</a>。替换过去的 +showcmd。
"+title"        MSDOS 不加入设置标题和图标的代码，反正这也不可能做到。
+cmdline_compl  编译时关闭除了文件、目录和帮助项目之外的命令行补全。

特性从函数调用列表移到一个数组。这样可以节省一点空间。

输入函数体时，根据 "if" 和 "while" 命令调整缩进。

VMS: 根据 Arpadffy 的建议稍稍调整 os_vms.mms。

<a href="options.html#'comments'">'comments'</a> 选项的标志位现在可以包含位移。这样就可以用相同的 <a href="options.html#'comments'">'comments'</a> 设置对
齐 "/*****"、"/*   xxx" 和 "/*" 注释。<a href="options.html#'comments'">'comments'</a> 的缺省值用到这一特性。
加入 'O' 标志位: 这部分不用于 "O" 命令。用于 "set com=sO:*\ -,mO:*\ \ ,exO:*/"

FileType 自动命令识别 ".bak"、".orig" 和 "~" 扩展名，删除它们以寻找相关的扩展
名。

编写 Vim 脚本部分的教程得到扩充。

帮助文件提供更多高亮，用于不能按本义输入的项目。

提供了 "<code class="keystroke">CTRL-W</code> <code class="keystroke">CTRL-G</code>"，相当于 "<code class="keystroke">CTRL-W</code> g"。

OS/2 的 "make test"。

调整 configure，BeOS 自动使用 GUI。


修正                                                    <b class="vimtag"> <a name="fixed-5.4">fixed-5.4</a> </b>
</section><hr class="singleline" /><section class=inner>

5.3.1: When using an autocommand for BufWritePre that changes the name of the
buffer, freed memory would be used. (Geddes)

Mac: Compiler didn't understand start of skip_class_name().

Win32 GUI:
- When cancelling the font requester, don't give an error message.
- When a tearoff-menu is open and its menu is deleted, Vim could crash.
  (Negri)
- There was a problem on Windows 95 with (un)maximizing the window.
  (Williams)
- when <a href="options.html#'mousehide'">'mousehide'</a> is set, the mouse would stay hidden when a menu is dropped
  with the keyboard. (Ralston)
- The tempname() function already created the file.  Caused problems when
  using ":w".  Now the file is deleted.
- Cursor disappeared when ending up in the top-left character on the screen
  after scrolling. (Webb)
- When adding a submenu for a torn-off menu, it was not updated.
- Menu tooltip was using the toolbar tooltip. (Negri)
- Setting <a href="options.html#'notitle'">'notitle'</a> didn't remove the title. (Steed)
- Using ":!start cmd" scrolled the screen one line up, and didn't wait for
  return when the command wasn't found.

Cscope interface: Sorting of matches was wrong.  Starting the interface could
fail. (Kahn)

Motif GUI: Could not compile with Motif 1.1, because some tear-off
functionality was not in #ifdefs.

Configure could sometimes not compile or link the test program for sizeof(int)
properly.  This caused alignment problems for the undo structure allocations.
Added a safety check that SIZEOF_INT is not zero.

Added configure check to test if strings.h can be included after string.h.
Some systems can't handle it.
Some systems need both string.h and strings.h included.  Adjusted vim.h for
that.  Removed including string.h from os_unixx.h, since it's already in
vim.h. (Savage)
AIX: defining _NO_PROTO in os_unix.h causes a conflict between string.h and
strings.h, but after the configure check said it was OK.  Also define
_NO_PROTO for AIX in the configure check. (Winn)

When closing a window with <code class="keystroke">CTRL-W</code> c, the value of <a href="options.html#'hidden'">'hidden'</a> was not taken into
account, the buffer was always unloaded. (Negri)

Unix Makefile: "make install" always tried to rename an older executable and
remove it.  This caused an error message when it didn't exit.  Added a check
for the existence of an old executable.
The command line for "make install" could get too long, because of the many
syntax files.  Now first do a "cd" to reduce the length.

On RISCOS and MSDOS, reading a file could fail, because the short filename was
used, which can be wrong after a ":!cd".

In the DOS versions, the wrong install.exe was included (required Windows).
Now the install.exe version is included that is the same as the Vim version.
This also supports long file names where possible.

When recording, and stopping while in Insert mode with <code class="keystroke">CTRL-O</code> q, the <code class="keystroke">CTRL-O</code>
would also be recorded.

32bit DOS version: "vim \file", while in a subdirectory, resulted in "new
file" for "file" in the local directory, while "\file" did exist.  When
"file" in the current directory existed, this didn't happen.

MSDOS: Mouse could not go beyond 80 columns in 132 columns mode. (Young)

"make test" failed in the RedHat RPM, because compatible is off by default.

In Insert mode <code class="special">&lt;C-O&gt;</code><code class="special">&lt;C-W&gt;</code><code class="special">&lt;C-W&gt;</code> changes to other window, but the status bars
were not updated until another character was typed.

MSDOS: environment options in lowercase didn't work, although they did in the
Win32 versions. (Negri)

After ":nohlsearch", a tag command switched highlighting back on.

When using "append" command as the last line in an autocommand, Vim would
crash.

RISCOS: The scroll bumpers (?) were not working properly. (Leonard)

"zl" and "zh" could move the cursor, but this didn't set the column in which
e.g., "k" would move the cursor.

When doing ":set all&amp;" the value of <a href="options.html#'scroll'">'scroll'</a> was not set correctly.  This
caused an error message when later setting any other number option.

When <a href="options.html#'hlsearch'">'hlsearch'</a> highlighting has been disabled with ":nohlsearch",
incremental searching would switch it back on too early.

When listing tags for ":tselect", and using a non-search command, and the last
character was equal to the first (e.g., "99"), the last char would not be
shown.

When searching for tags with ":tag" Vim would assume that all matches had been
found when there were still more (e.g. from another tags file).

Win32: Didn't recognize "c:\" (e.g., in tags file) as absolute path when
upper/lowercase was different.

Some xterms (Debian) send <code class="special">&lt;Esc&gt;</code>OH for HOME and <code class="special">&lt;Esc&gt;</code>OF for END.  Added these
to the builtin-xterm.

In ex mode, any CR was seen as the end of the line.  Only a NL should be
handled that way.  broke ":s/foo/some^Mtext/".

In menu.vim, a vmenu was used to override an amenu.  That didn't work, because
the system menu file doesn't overwrite existing menus.  Added explicit vunmenu
to solve this.

Configure check for terminal library could find a library that doesn't work at
runtime (Solaris: shared library not found).  Added a check that a program
with tgoto() can run correctly.

Unix: "echo -n" in the Makefile doesn't work on all systems, causing errors
compiling pathdef.c.  Replaced it with "tr".

Perl: DO_JOIN was redefined by Perl.  Undefined it in the perl files.

Various XIM and multibyte fixes:
- Fix user cannot see his language while he is typing his language with
  off-the-spot method. (Nagano)
- Fix preedit position using text/edit area (using gui.wid). (Nagano)
- remove 'fix dead key' codes. It was needed since XNFocusWindow was
  "x11_window", XNFocusWindow is now gui.wid. (Nagano)
- Remove some compile warnings and fix typos. (Namsh)
- For status area, check the gtk+ version while Vim runs.  I believe it is
  better than compile time check. (Namsh)
- Remove one FIXME for gtk+-xim. (Namsh)
- XIM: Dead keys didn't work for Czech. (Vyskovsky)
- Multibyte: If user input only 3byte such as mb1_mb2_eng or eng_mb1_mb2 VIM
  could convert it to special character. (Nam)
- Athena/Motif with XIM: fix preedit area. (Nam)
- XIM: Composed strings were sometimes ignored.  Vim crashed when compose
  string was longer than 256 bytes.  IM's geometry control is fixed. (Nam,
  Nagano)
- Win32 multibyte: hollowed cursor width on a double byte char was wrong.
  (Nagano)
- When there is no GUI, selecting XIM caused compilation problems.
  Automatically disable XIM when there is no GUI in configure.
- Motif and Athena: When compiled with XIM, but the input method was not
  enabled, there would still be a status line.  Now the status line is gone if
  the input method doesn't work. (Nam)

Win32: tooltip was not removed when selecting a parent menu (it was when
selecting a menu entry). (Negri)

Unix with X: Some systems crash on exit, because of the XtCloseDisplay() call.
Removed it, it should not be necessary when exiting.

Win32: Crash on keypress when compiled with Borland C++. (Aaron)

When checking for Motif library files, prefer the same location as the include
files (with "include" replaced with "lib") above another entry.

Athena GUI: Changed "XtOffset()" in gui_at_fs.c to "XtOffsetOf()", like it's
used in gui_x11.c.

Win32: When testing for a timestamp of a file on floppy, would get a dialog
box when the floppy has been removed.  Now return with an error.  (Negri)

Win32 OLE: When forced to come to the foreground, a minimized window was still
minimized, now it's restored. (Zivkov)

There was no check for a positive <a href="options.html#'shiftwidth'">'shiftwidth'</a>.  A negative value could cause
a hangup, a zero value a crash.

Athena GUI: horizontal scrollbar wasn't updated correctly when clicking right
or left of the thumb.

When making a Visual-block selection in one window, and trying to scroll
another, could cause errors for accessing non-existent line numbers.

When <a href="options.html#'matchpairs'">'matchpairs'</a> contains "`:'", jumping from the ` to the ' didn't work
properly.

Changed '\"' to '"' to make it compatible with old C compilers.

The command line expansion for mappings caused a script with a TAB between lhs
and rhs of a map command to fail.  Assume the TAB is to separate lhs and rhs
when there are no mappings to expand.

When editing a file with very long lines with <a href="options.html#'scrolloff'">'scrolloff'</a> set, "j" would
sometimes end up in a line which wasn't displayed.

When editing a read-only file, it was completely read into memory, even when
it would not fit.  Now create a swap file for a read-only file when running
out of memory while reading the file.

When using ":set cino={s,e-s", a line after "} else {" was not indented
properly.  Also added a check for this in test3.in.

The Hebrew mapping for the command line was remembered for the next command
line.  That isn't very useful, a command is not Hebrew. (Kol)

When completing file names with embedded spaces, like "Program\ files", this
didn't work.  Also for user commands.  Moved backslash_halve() down to
mch_expandpath().

When using "set mouse=a" in Ex mode, mouse events were handled like typed
text.  Then typing "quit" screwed up the mouse behavior of the xterm.

When repeating an insert with "." that contains a <code class="keystroke">CTRL-Y</code>, a number 5 was
inserted as "053".

Yanking a Visual area, with the cursor past the line, didn't move the cursor
back onto the line.  Same for "~", "u", "U" and "g?"

Win32: Default for <a href="options.html#'grepprg'">'grepprg'</a> could be "findstr /n" even though there is no
findstr.exe (Windows 95).  Check if it exists, and fall back to "grep -n" if
it doesn't.

Because gui_mouse_moved() inserted a leftmouse click in the input buffer,
remapping a leftmouse click caused strange effects.  Now Insert another code
in the input buffer.  Also insert a leftmouse release, to avoid the problem
with ":map <code class="special">&lt;LeftMouse&gt;</code> l" that the next release is seen as the release for the
focus click.

With <a href="options.html#'wrap'">'wrap'</a> on, when using a line that doesn't fit on the screen, if the start
of the Visual area is before the start of the screen, there was no
highlighting.  Also, <a href="options.html#'showbreak'">'showbreak'</a> doesn't work properly.

DOS, Win32: A pattern "[0-9]\+" didn't work in autocommands.

When creating a swap file for a buffer which isn't the current buffer, could
get a mixup of short file name, resulting in a long file name when a short
file name was required.  makeswapname() was calling modname() instead of
buf_modname().

When a function caused an error, and the error message was very long because
of recursiveness, this would cause a crash.

<a href="options.html#'suffixes'">'suffixes'</a> were always compared with matching case.  For MS-DOS, Win32 and
OS/2 case is now ignored.

The use of CHARBITS in regexp.c didn't work on some Linux.  Don't use it.

When generating a script file, <a href="options.html#'cpo'">'cpo'</a> was made empty.  This caused backslashes
to disappear from mappings.  Set it to "B" to avoid that.

Lots of typos in the documentation. (Campbell)

When editing an existing (hidden) buffer, jump to the last used cursor
position. (Madsen)

On a Sun the xterm screen was not restored properly when suspending. (Madsen)

When $VIMINIT is processed, <a href="options.html#'nocompatible'">'nocompatible'</a> was only set after processing it.

Unix: Polling for a character wasn't done for GPM, Sniff and Xterm clipboard
all together.  Cleaned up the code for using select() too.

When executing external commands from the GUI, some typeahead was lost.  Added
some code to regain as much typeahead as possible.

When the window height is 5 lines or fewer, <code class="special">&lt;PageDown&gt;</code> didn't use a one-line
overlap, while <code class="special">&lt;PageUp&gt;</code> does.  Made sure that <code class="special">&lt;PageUp&gt;</code> uses the same overlap
as <code class="special">&lt;PageDown&gt;</code>, so that using them both always displays the same lines.

Removed a few unused functions and variables (found with lint).

Dictionary completion didn't use <a href="options.html#'infercase'">'infercase'</a>. (Raul)

Configure tests failed when the Perl library was not in LD_LIBRARY_PATH.
Don't use the Perl library for configure tests, add it to the linker line only
when linking Vim.

When using ncurses/terminfo, could get a <a href="term.html#'t_Sf'">'t_Sf'</a> and <a href="term.html#'t_Sb'">'t_Sb'</a> termcap entry that
has "%d" instead of "%p1%d".  The light background colors didn't work then.

GTK GUI with ncurses: Crashed when starting up in tputs().  Don't use tputs()
when the GUI is active.

Could use the ":let" command to set the "count", "shell_error" and "version"
variables, but that didn't work.  Give an error message when trying to set
them.

On FreeBSD 3.0, tclsh is called tclsh8.0.  Adjusted configure.in to find it.

When Vim is linked with -lncurses, but python uses -ltermcap, this causes
trouble: "OOPS".  Configure now removes the -ltermcap.

:@" and :*" didn't work properly, because the " was recognized as the start of
a comment.

Win32s GUI: Minimizing the console where a filter command runs in caused
trouble for detecting that the filter command has finished. (Negri)

After executing a filter command from an xterm, the mouse would be disabled.
It would work again after changing the mode.

Mac GUI: Crashed in newenv(). (St-Amant)

The menus and mappings in mswin.vim didn't handle text ending in a NL
correctly. (Acevedo)

The ":k" command didn't check if it had a valid argument or extra characters.
Now give a meaningful error message. (Webb)

On SGI, the signal function doesn't always have three arguments.  Check for
struct sigcontext to find out.  Might still be wrong...

Could crash when using <a href="options.html#'hlsearch'">'hlsearch'</a> and search pattern is "^".

When search patterns were saved and restored, status of no_hlsearch was not
also saved and restored (from ":nohlsearch" command).

When using setline() to make a line shorter, the cursor position was not
adjusted.

MS-DOS and Win95: When trying to edit a file and accidentally adding a slash
or backslash at the end, the file was deleted.  Probably when trying to create
the swap file.  Explicitly check for a trailing slash or backslash before
trying to read a file.

X11 GUI: When starting the GUI failed and received a deadly signal while
setting the title, would lock up when trying to exit, because the title is
reset again.  Avoid using mch_settitle() recursively.

X11 GUI: When starting the GUI fails, and then trying it again, would crash,
because argv[] has been freed and x11_display was reset to NULL.

Win32: When $HOME was set, would put "~user" in the swap file, which would
never compare with a file name, and never cause the attention message.  Put
the full path in the swap file instead.

Win32 console: There were funny characters at the end of the "vim -r" swap
files message (direct output of CR CR LF).

DOS 32 bit: "vim -r" put the text at the top of the window.

GUI: With <a href="options.html#'mousefocus'">'mousefocus'</a> set, got mouse codes as text with "!sleep 100" or "Q".

Motif and Win32 GUI: When changing <a href="options.html#'guifont'">'guifont'</a> to a font of the same size the
screen wasn't redrawn.

Unix: When using ":make", jumping to a file b.c, which is already open as a
symbolic link a.c, opened a new buffer instead of using the existing one.

Inserting text in the current buffer while sourcing the .vimrc file would
cause a crash or hang.  The memfile for the current buffer was never
allocated.  Now it's allocated as soon as something is written in the buffer.

DOS 32 bit: "lightblue" background worked for text, but not drawn parts were
black.

DOS: Colors of console were not restored upon exiting.

When recording, with <a href="options.html#'cmdheight'">'cmdheight'</a> set to 2 and typing Esc&gt; in Insert mode
caused the "recording" message to be doubled.

Spurious "file changed" messages could happen on Windows.  Now tolerate a one
second difference, like for Linux.

GUI: When returning from Ex mode, scrollbars were not updated.

Win32: Copying text to the clipboard containing a <code class="special">&lt;CR&gt;</code>, pasting it would
replace it with a <code class="special">&lt;NL&gt;</code> and drop the next character.

Entering a double byte character didn't work if the second byte is in <code class="special">[xXoO]</code>.
(Eric Lee)

vim_realloc was both defined and had a prototype in proto/misc2.pro.  Caused
conflicts on Solaris.

A pattern in an autocommand was treated differently on DOS et al. than on
Unix.  Now it's the same, also when using backslashes.

When using <code class="special">&lt;Tab&gt;</code> twice for command line completion, without a match, the <code class="special">&lt;Tab&gt;</code>
would be inserted. (Negri)

Bug in MS-Visual C++ 6.0 when compiling ex_docmd.c with optimization. (Negri)

Testing the result of mktemp() for failure was wrong.  Could cause a crash.
(Peters)

GUI: When checking for a ".gvimrc" file in the current directory, didn't check
for a "_gvimrc" file too.

Motif GUI: When using the popup menu and then adding an item to the menu bar,
the menu bar would get very high.

Mouse clicks and special keys (e.g. cursor keys) quit the more prompt and
dialogs.  Now they are ignored.

When at the more-prompt, xterm selection didn't work.  Now use the 'r' flag in
<a href="options.html#'mouse'">'mouse'</a> also for the more-prompt.

When selecting a Visual area of more than 1023 lines, with <a href="options.html#'guioptions'">'guioptions'</a> set to
"a", could mess up the display because of a message in free_yank().  Removed
that message, except for the Amiga.

Moved auto-selection from ui_write() to the screen update functions.  Avoids
unexpected behavior from a low-level function.  Also makes the different
feedback of owning the selection possible.

Vi incompatibility: Using "i<code class="special">&lt;CR&gt;</code>" in an indent, with <a href="options.html#'ai'">'ai'</a> set, used the
original indent instead of truncating it at the cursor. (Webb)

":echo x" didn't stop at "q" for the more prompt.

Various fixes for Macintosh. (St-Amant)

When using <a href="options.html#'selectmode'">'selectmode'</a> set to "exclusive", selecting a word and then using
<code class="keystroke">CTRL-]</code> included the character under the cursor.

Using ":let a:name" in a function caused a crash. (Webb)

When using ":append", an empty line didn't scroll up.

DOS etc.: A file name starting with '!' didn't work.  Added '!' to default for
<a href="options.html#'isfname'">'isfname'</a>.

BeOS: Compilation problem with prototype of skip_class_name(). (Price)

When deleting more than one line, e.g., with "de", could still use "U"
command, which didn't work properly then.

Amiga: Could not compile ex_docmd.c, it was getting too big.  Moved some
functions to ex_cmds.c.

The expand() function would add a trailing slash for directories.

Didn't give an error message when trying to assign a value to an argument of a
function.  (Webb)

Moved including sys/ptem.h to after termios.h.  Needed for Sinix.

OLE interface: Don't delete the object in CVimCF::Release() when the reference
count becomes zero. (Cordell)
VisVim could still crash on exit. (Erhardt)

"case a: case b:" (two case statements in one line) aligned with the second
case.  Now it uses one <a href="options.html#'sw'">'sw'</a> for indent. (Webb)

Font initialisation wasn't right for Athena/Motif GUI.  Moved the call to
highlight_gui_started() gui_mch_init() to gui_mch_open(). (Nam)

In Replace mode, backspacing over a TAB before where the replace mode started
while <a href="options.html#'sts'">'sts'</a> is different from <a href="options.html#'ts'">'ts'</a>, would delete the TAB.

Win32 console: When executing external commands and switching between the two
console screens, Vim would copy the text between the buffers.  That caused the
screen to be messed up for backtick expansion.

":winpos -1" then ":winpos" gave wrong error message.

Windows commander creates files called c:\tmp\$wc\abc.txt.  Don't remove the
backslash before the $.  Environment variables were not expanded anyway,
because of the backslash before the dollar.

Using "-=" with ":set" could remove half a part when it contains a "\,".
E.g., ":set path+=a\\,b" and then "set path-=b"  removed ",b".

When Visually selecting lines, with <a href="options.html#'selection'">'selection'</a> set to "inclusive", including
the last char of the line, "&lt;&lt;" moved an extra line.  Also for other operators
that always work on lines.

link.sh changed "-lnsl_s" to "_s" when looking for "nsl" to be removed.
Now it only removes whole words.

When jumped to a mark or using "fz", and there is an error, the current column
was lost.  E.g. when using "$fzj".

The "g <code class="keystroke">CTRL-G</code>" command could not be interrupted, even though it can take a
long time.

Some terminals do have <code class="special">&lt;F4&gt;</code> and <code class="special">&lt;xF4&gt;</code>.  <code class="special">&lt;xF4&gt;</code> was always interpreted as <code class="special">&lt;F4&gt;</code>.
Now map <code class="special">&lt;xF4&gt;</code> to <code class="special">&lt;F4&gt;</code>, so that the user can override this.

When compiling os_win32.c with MIN_FEAT the apply_autocmds() should not be
used. (Aaron)

This autocommand looped forever: ":au FileChangedShell * ++nested e <code class="special">&lt;afile&gt;</code>"
Now FileChangeShell never nests. (Roemer)

When evaluating an ":elseif" that was not going to matter anyway, ignore
errors. (Roemer)

GUI Lesstif: Tearoff bar was the last item, instead of the first.

GUI Motif: Colors of tear-off widgets was wrong when 't' flag added to
<a href="options.html#'guioptions'">'guioptions'</a> afterwards.  When 't' flag in <a href="options.html#'guioptions'">'guioptions'</a> is excluded, would
still get a tearoff item in a new menu.

An inode number can be "long long".  Use ino_t instead of long.  Added
configure check for ino_t.

Binary search for tags was using a file offset "long" instead of "off_t".

Insert mode completion of tags was not using <a href="options.html#'ignorecase'">'ignorecase'</a> properly.

In Insert mode, the <code class="special">&lt;xFn&gt;</code> keys were not properly mapped to <code class="special">&lt;Fn&gt;</code> for the
default mappings.  Also caused errors for ":mkvimrc" and ":mksession".

When jumping to another window while in Insert mode, would get the "warning:
changing readonly file" even when not making a change.

A '(' or '{' inside a trailing "//" comment would disturb C-indenting.
When using two labels below each other, the second one was not indented
properly.  Comments could mess up C-indenting in many places.  (Roemer)

Could delete or redefine a function while it was being used.  Could cause a
crash.
In a function it's logical to prepend "g:" to a system variable, but this
didn't work. (Roemer)

Hangul input: Buffer would overflow when user inputs invalid key sequence.
(Nam)

When BufLoad or BufEnter autocommands change the topline of the buffer in the
window, it was overruled and the cursor put halfway the window.  Now only put
the cursor halfway if the autocommands didn't change the topline.

Calling exists("&amp;option") always returned 1. (Roemer)

Win32: Didn't take actually available memory into account. (Williams)

White space after an automatically inserted comment leader was not removed
when <a href="options.html#'ai'">'ai'</a> is not set and <code class="special">&lt;CR&gt;</code> hit just after inserting it. (Webb)

A few menus had duplicated accelerators. (Roemer)

Spelling errors in documentation, quite a few "the the". (Roemer)

Missing prototypes for Macintosh. (Kielhorn)

Win32: When using <a href="options.html#'shellquote'">'shellquote'</a> or <a href="options.html#'shellxquote'">'shellxquote'</a>, the "!start cmd" wasn't
executed in a disconnected process.

When resizing the window, causing a line before the cursor to wrap or unwrap,
the cursor was displayed in the wrong position.

There was quite a bit of dead code when compiling with minimal features.

When doing a ":%s///" command that makes lines shorter, such that lines above
the final cursor position no longer wrap, the cursor position was not updated.

get_id_list() could allocate an array one too small, when a "contains=" item
has a wildcard that matches a group name that is added just after it.  E.g.:
"contains=a.*b,axb".  Give an error message for it.

When yanking a Visual area and using the middle mouse button -&gt; crash.  When
clipboard doesn't work, now make "* always use "".

Win32: Using ":buf a\ b\file" didn't work, it was interpreted as "ab\file".

Using ":ts ident", then hit <code class="special">&lt;CR&gt;</code>, with <a href="options.html#'cmdheight'">'cmdheight'</a> set to 2: command line was
not cleared, the tselect prompt was on the last but one line.

mksession didn't restore the cursor column properly when it was after a tab.
Could not get all windows back when using a smaller terminal screen.  Didn't
restore all windows when "winsize" was not in <a href="options.html#'sessionoptions'">'sessionoptions'</a>. (Webb)

Command line completion for ":buffer" depended on <a href="options.html#'ignorecase'">'ignorecase'</a> for Unix, but
not for DOS et al.  Now don't use <a href="options.html#'ignorecase'">'ignorecase'</a>, but let it depend on whether
file names are case sensitive or not (like when expanding file names).

Win32 GUI: (Negri)
- Redrawing the background caused flicker when resizing the window.  Removed
  _OnEraseBG().  Removed CS_HREDRAW and CS_VREDRAW flags from the
  sndclass.style.
- Some parts of the window were drawn in grey, instead of using the color from
  the user color scheme.
- Dropping a file on gvim didn't activate the window.
- When there is no menu (<a href="options.html#'guioptions'">'guioptions'</a> excludes 'm'), never use the ALT key for
  it.

GUI: When resizing the window, would make the window height a bit smaller.
Now round off to the nearest char cell size. (Negri)

In Vi the ")" and "(" commands don't stop at a single space after a dot.
Added 'J' flag in <a href="options.html#'cpoptions'">'cpoptions'</a> to make this behave Vi compatible. (Roemer)

When saving a session without any buffers loaded, there would be a ":normal"
command without arguments in it. (Webb)

Memory leaks fixed: (Madsen)
- eval.c: forgot to release func structure when func deleted
- ex_docmd.c: forgot to release string after "<code class="special">&lt;sfile&gt;</code>"
- misc1.c: leak when completion pattern had no matches.
- os_unix.c: forgot to release regexp after file completions

Could crash when using a buffer without a name. (Madsen)
Could crash when doing file name completion, because of backslash_halve().
(Madsen)

":@a" would do mappings on register a, which is not Vi compatible. (Roemer)

":g/foo.*()/s/foobar/_&amp;/gc" worked fine, but then "n" searched for "foobar"
and displayed "/foo.*()". (Roemer)

OS/2: get_cmd_output() was not included.  Didn't check for $VIM/.vimrc file.

Command line completion of options didn't work after "+=" and "-=".

Unix configure: Test for memmove()/bcopy()/memcpy() tried redefining these
functions, which could fail if they are defined already.  Use mch_memmove() to
redefine.

Unix: ":let a = expand(" <code class="badlink">xterm</code> &amp;")" started an xterm asynchronously, but
":let a = expand(" <code class="badlink">xterm&amp;</code> ")" generated an error message, because the
redirection was put after the '&amp;'.

Win32 GUI: Dialog buttons could not be selected properly with cursor keys,
when the default is not the first button. (Webb)

The "File has changed since editing started" (when regaining focus) could not
always be seen. (Webb)

When starting with "ex filename", the file message was overwritten with
the "entering Ex mode" message.

Output of ":tselect" listed name of file directly from the tags file.  Now it
is corrected for the position of the tags file.

When <a href="options.html#'backspace'">'backspace'</a> is 0, could backspace over autoindent.  Now it is no longer
allowed (Vi compatible).

In Replace mode, when <a href="options.html#'noexpandtab'">'noexpandtab'</a> and <a href="options.html#'smarttab'">'smarttab'</a> were set, and inserting
Tabs, backspacing didn't work correctly for Tabs inserted at the start of the
line (unless <a href="options.html#'sts'">'sts'</a> was set too).  Also, when replacing the first non-blank
after which is a space, rounding the indent was done on the first non-blank
instead of on the character under the cursor.

When <a href="options.html#'sw'">'sw'</a> at 4, <a href="options.html#'ts'">'ts'</a> at 8 and <a href="options.html#'smarttab'">'smarttab'</a> set: When a tab was appended after
four spaces (they are replaced with a tab) couldn't backspace over the tab.

In Insert mode, with <a href="options.html#'bs'">'bs'</a> set to 0, couldn't backspace to before autoindent,
even when it was removed with <code class="keystroke">CTRL-D</code>.

When repeating an insert command where a <code class="special">&lt;BS&gt;</code>, <code class="special">&lt;Left&gt;</code> or other key causes an
error, would flush buffers and remain in Insert mode.  No longer flush
buffers, only beep and continue with the insert command.

Dos and Win32 console: Setting t_me didn't work to get another color.  Made
this works backwards compatible.

For Turkish (LANG = "tr") uppercase 'i' is not an 'I'.  Use ASCII uppercase
translation in vim_strup() to avoid language problems. (Komur)

Unix: Use usleep() or nanosleep() for mch_delay() when available.  Hopefully
this avoids a hangup in select(0, ..) for Solaris 2.6.

Vim would crash when using a script file with 'let &amp;sp = "| tee"', starting
vim with "vim -u test", then doing ":set sp=".  The P_WAS_SET flag wasn't set
for a string option, could cause problems with any string option.

When using "cmd | vim -", stdin is not a terminal.  This gave problems with
GPM (Linux console mouse) and when executing external commands.  Now close
stdin and re-open it as a copy of stderr.

Syntax highlighting: A "nextgroup" item was not properly stored in the state
list.  This caused missing of next groups when not redrawing from start to
end, but starting halfway.

Didn't check for valid values of <a href="options.html#'ttymouse'">'ttymouse'</a>.

When executing an external command from the GUI, waiting for the child to
terminate might not work, causing a hang. (Parmelan)

"make uninstall" didn't delete the vimrc_example.vim and gvimrc_example.vim
files and the vimtutor.

Win32: "expand("%:p:h")" with no buffer name removed the directory name.
"fnamemodify("", ":p")" did not add a trailing slash, fname_case() removed it.

Fixed: When <a href="options.html#'hlsearch'">'hlsearch'</a> was set and the 'c' flag was not in <a href="options.html#'cpoptions'">'cpoptions'</a>:
highlighting was not correct.  Now overlapping matches are handled correctly.

Athena, Motif and GTK GUI: When started without focus, cursor was shown as if
with focus.

Don't include <a href="options.html#'shellpipe'">'shellpipe'</a> when compiled without quickfix, it's not used.
Don't include <a href="options.html#'dictionary'">'dictionary'</a> option when compiled without the +insert_expand
feature.
Only include the <a href="options.html#'shelltype'">'shelltype'</a> option for the Amiga.

When making a change to a line, with <a href="options.html#'hlsearch'">'hlsearch'</a> on, causing it to wrap, while
executing a register, the screen would not be updated correctly.  This was a
generic problem in update_screenline() being called while must_redraw is
VALID.

Using ":bdelete" in a BufUnload autocommand could cause a crash.  The window
height was added to another window twice in close_window().

Win32 GUI: When removing a menu item, the tearoff wasn't updated. (Negri)

Some performance bottlenecks removed.  Allocating memory was not efficient.
For Win32 checking for available memory was slow, don't check it every time
now.  On NT obtaining the user name takes a long time, cache the result (for
all systems).

fnamemodify() with an argument ":~:." or ":.:~" didn't work properly.

When editing a new file and exiting, the marks for the buffer were not saved
in the viminfo file.

":confirm only" didn't put up a dialog.

These text objects didn't work when <a href="options.html#'selection'">'selection'</a> was "exclusive": va( vi( va{
vi{ va&lt; vi&lt; vi[ va[.

The dialog for writing a readonly file didn't have a valid default. (Negri)

The line number used for error messages when sourcing a file was reset when
modelines were inspected.  It was wrong when executing a function.

The file name and line number for an error message wasn't displayed when it
was the same as for the last error, even when this was long ago.  Now reset
the name/lnum after a hit-enter prompt.

In a session file, a "%" in a file name caused trouble, because fprintf() was
used to write it to the file.

When skipping statements, a mark in an address wasn't skipped correctly:
"ka|if 0 <code class="badlink">'ad</code> else <code class="badlink">echo</code> endif". (Roemer)

":wall" could overwrite a not-edited file without asking.

GUI: When $DISPLAY was not set or starting the GUI failed in another way, the
console mode then started with wrong colors and skipped initializations.  Now
do an early check if the GUI can be started.  Don't source the menu.vim or
gvimrc when it will not.  Also do normal terminal initializations if the GUI
might not start.

When using a BufEnter autocommand to position the cursor and scroll the
window, the cursor was always put at the last used line and halfway the window
anyhow.

When <a href="options.html#'wildmode'">'wildmode'</a> was set to "longest,list:full", ":e *.c<code class="special">&lt;Tab&gt;</code><code class="special">&lt;Tab&gt;</code>" didn't list
the matches.  Also avoid that listing after a "longest" lists the wrong
matches when the first expansion changed the string in front of the cursor.

When using ":insert", ":append" or ":change" inside a while loop, was not able
to break out of it with a <code class="keystroke">CTRL-C</code>.

Win32: ":e ." took an awful long time before an error message when used in
"C:\".  Was caused by adding another backslash and then trying to get the full
name for "C:\\".

":winpos -10 100" was working like ":winpos -10 -10", because a pointer was
not advanced past the '-' sign.

When obtaining the value of a hidden option, would give an error message.  Now
just use a zero value.

OS/2: Was using argv[0], even though it was not a useful name.  It could be
just "vim", found in the search path.

Xterm: ":set columns=78" didn't redraw properly (when lines wrap/unwrap) until
after a delay of <a href="options.html#'updatetime'">'updatetime'</a>.  Didn't check for the size-changed signal.

<a href="options.html#'scrollbind'">'scrollbind'</a> didn't work in Insert mode.
Horizontal scrollbinding didn't always work for "0" and "$" commands (e.g.,
when <a href="options.html#'showcmd'">'showcmd'</a> was off).

When compiled with minimal features but with GUI, switching on the mouse in an
xterm caused garbage, because the mouse codes were not recognized.  Don't
enable the mouse when it can't be recognized.  In the GUI it also didn't work,
the arguments to the mouse code were not interpreted.

When <a href="options.html#'showbreak'">'showbreak'</a> used, in Insert mode, when the cursor is just after the last
character in the line, which is also the in the rightmost column, the cursor
position would be like the <a href="options.html#'showbreak'">'showbreak'</a> string is shown, but it wasn't.

Autocommands could move the cursor in a new file, so that <code class="keystroke">CTRL-W</code> i didn't show
the right line.  Same for when using a filemark to jump to another file.

When redefining the argument list, the title used for other windows could be
showing the wrong info about the position in the argument list.  Also update
this for a ":split" command without arguments.

When editing file 97 of 13, ":Next" didn't work.  Now it goes to the last
file in the argument list.

Insert mode completion (for dictionaries or included files) could not be
interrupted by typing an <code class="special">&lt;Esc&gt;</code>.  Could get hit-enter prompt after line
completion, or whenever the informative message would get too long.

When using the ":edit" command to re-edit the same file, an autocommand to
jump to the last cursor position caused the cursor to move.  Now set the last
used cursor position to avoid this.

When <a href="options.html#'comments'">'comments'</a> has a part that starts with white space, formatting the
comment didn't work.

At the ":tselect" prompt Normal mode mappings were used.  That has been
disabled.

When <a href="options.html#'selection'">'selection'</a> is not "old", some commands still didn't allow the cursor
past the end-of-line in Visual mode.

Athena: When a menu was deleted, it would appear again (but not functional)
when adding another menu.  Now they don't reappear anymore (although they are
not really deleted either).

Borland C++ 4.x had an optimizer problem in fill_breakat_flags(). (Negri)

"ze" didn't work when <a href="options.html#'number'">'number'</a> was on. (Davis)

Win32 GUI: Intellimouse code didn't work properly on Windows 98. (Robinson)

A few files were including proto.h a second time, after vim.h had already done
that, which could cause problems with the vim_realloc() macro.

Win32 console: <code class="special">&lt;M-x&gt;</code> or ALT-x was not recognized.  Also keypad '+', '-' and
'*'. (Negri)
MS-DOS: <code class="special">&lt;M-x&gt;</code> didn't work, produced a two-byte code.  Now the alphabetic and
number keys work. (Negri)

When finding a lot of matches for a tag completion, the check for avoiding
double matches could take a lot of time.  Add a line_breakcheck() to be able
to interrupt this. (Deshpande)

When the command line was getting longer than the screen, the more-prompt
would be given regularly, and the cursor position would be wrong.  Now only
show the part of the command line that fits on the screen and force the cursor
to be positioned on the visible part.  There can be text after the cursor
which isn't editable.

At the more prompt and with the console dialog, a cursor key was interpreted
as <code class="special">&lt;Esc&gt;</code> and OA.  Now recognize special keys in get_keystroke().  Ignore mouse
and scrollbar events.

When typing a BS after inserting a middle comment leader, typing the last char
of the end comment leader still changed it into the end comment leader. (Webb)

When a file system is full, writing to a swap file failed.  Now first try to
write one block to the file.  Try next entry in <a href="options.html#'dir'">'dir'</a> if it fails.

When "~" is in <a href="options.html#'whichwrap'">'whichwrap'</a>, doing "~" on last char of a line didn't update the
display.

Unix: Expanding wildcards for ":file <code class="special">{\\}</code>" didn't work, because "\}" was
translated to "}" before the shell got it.  Now don't remove backslashes when
wildcards are going to be expanded.

Unix: ":e /tmp/$uid" didn't work.  When expanding environment variables in a
file name doesn't work, use the shell to expand the file name. ":e /tmp/$tty"
still doesn't work though.

"make test" didn't always work on DOS/Windows for test30, because it depended
on the external "echo" command.

The link.sh script used "make" instead of $MAKE from the Makefile.  Caused
problems for generating pathdef.c when "make" doesn't work properly.

On versions that can do console and GUI: In the console a typed CSI code could
cause trouble.

The patterns in expression evaluation didn't ignore the 'l' flag in
<a href="options.html#'cpoptions'">'cpoptions'</a>.  This broke the working of <code class="special">&lt;CR&gt;</code> in the options window.

When <a href="options.html#'hls'">'hls'</a> off and <a href="options.html#'ai'">'ai'</a> on, "O<code class="special">&lt;Esc&gt;</code>" did remove the indent, but it was still
highlighted red for trailing space.

Win32 GUI: Dropping an encrypted file on a running gvim didn't work right.  Vim
would loop while outputting "*" characters.  vgetc() was called recursively,
thus it returns NUL.  Added safe_vgetc(), which reads input directly from the
user in this situation.

While reading text from stdin, only an empty screen was shown.  Now show that
Vim is reading from stdin.

The cursor shape wasn't set properly when returning to Insert mode, after
using a <code class="keystroke">CTRL-O</code> /asdf command which fails.  It would be OK after a few seconds.
Now it's OK right away.

The <a href="options.html#'isfname'">'isfname'</a> default for DOS/Windows didn't include the '@' character.  File
names that contained "dir\@file" could not be edited.

Win32 console: <code class="special">&lt;C-S-Left&gt;</code> could cause a crash when compiled with Borland or
egcs. (Aaron)

Unix and VMS: "#if HAVE_DIRENT_H" caused problems for some compilers.  Use
"#ifdef HAVE_DIRENT_H" instead. (Jones)

When a matching tag is in the current file but has a search pattern that
doesn't match, the cursor would jump to the first line.

Unix: Dependencies for pty.c were not included in Makefile.  Dependency of
ctags/config.h was not included (only matters for parallel make).

Removed a few Uninitialized Memory Reads (potential crashes).  In do_call()
calling clear_var() when not evaluating.  In win32_expandpath() and
dos_expandpath() calling backslash_halve() past the end of a file name.

Removed memory leaks: Set_vim_var_string() never freed the value.  The
next_list for a syntax keyword was never freed.

On non-Unix systems, using a file name with wildcards without a match would
silently fail.  E.g., ":e *.sh".  Now give a "No match" error message.

The life/life.mac, urm/urm.mac and hanoi/hanoi.mac files were not recognized
as Vim scripts.  Renamed them to *.vim.

[<code class="note">备注</code>: 有些编号的补丁在从 5.3 版本升级时没有意义，它们被删除了]

Patch 5.4m.1
问题:       When editing a file with a long name, would get the hit-enter
            prompt, even though all settings are such that the name should be
            truncated to avoid that.  filemess() was printing the file name
            without truncating it.
解决方案:   Truncate the message in filemess().  Use the same code as for
            msg_trunc_attr(), which is moved to the new function
            msg_may_trunc().
相关文件:   src/message.c, src/proto/message.pro, src/fileio.c

Patch 5.4m.3
问题:       The Motif libraries were not found by configure for Digital Unix.
解决方案:   Add "/usr/shlib" to the search path. (Andy Kahn)
相关文件:   src/configure.in, src/configure

Patch 5.4m.5
问题:       Win32 GUI: When using the Save-As menu entry and selecting an
            existing file in the file browser, would get a dialog to confirm
            overwriting twice.  (Ed Krall)
解决方案:   Removed the dialog from the file browser.  It would be nicer to
            set the "forceit" flag and skip Vim's ":confirm" dialog, but it
            requires quite a few changes to do that.
相关文件:   src/gui_w32.c

Patch 5.4m.6
问题:       Win32 GUI: When reading text from stdin, e.g., "cat foo | gvim -",
            a message box would pop up with "-stdin-" (when exiting). (Michael
            Schaap)
解决方案:   Don't switch off termcap mode for versions that are GUI-only.
            They use another terminal to read from stdin.
相关文件:   src/main.c, src/fileio.c

Patch 5.4m.7
问题:       Unix: running configure with --enable-gtk-check,
            --enable-motif-check, --enable-athena-check or --enable-gtktest
            had the reverse effect. (Thomas Koehler)
解决方案:   Use $enable_gtk_check variable correctly in AC_ARG_ENABLE().
相关文件:   src/configure.in, src/configure

Patch 5.4m.9
问题:       Multi-byte: With wrapping lines, the cursor was sometimes 2
            characters to the left.  Syntax highlighting was wrong when a
            double-byte character was split for a wrapping line.  When
            <a href="options.html#'showbreak'">'showbreak'</a> was on the splitting also didn't work.
解决方案:   Adjust getvcol() and win_line(). (Chong-Dae Park)
相关文件:   src/charset.c, src/screen.c

Patch 5.4m.11
问题:       The ":call" command didn't check for illegal trailing characters.
            (Stefan Roemer)
解决方案:   Add the check in do_call().
相关文件:   src/eval.c

Patch 5.4m.13
问题:       With the ":s" command:
            1. When performing a substitute command, the mouse would be
               disabled and enabled for every substitution.
            2. The cursor position could be beyond the end of the line.
               Calling line_breakcheck() could try to position the cursor,
               which causes a crash in the Win32 GUI.
            3. When using ":s" in a ":g" command, the cursor was not put on
               the first non-white in the line.
            4. There was a hit-enter prompt when confirming the substitution
               and the replacement was a bit longer.
解决方案:   1. Only disable/enable the mouse when asking for confirmation.
            2. Always put the cursor on the first character, it is going to be
               moved to the first non-blank anyway.
               Don't use the cursor position in gui_mch_draw_hollow_cursor(),
               get the character from the screen buffer.
            3. Added global_need_beginline flag to call beginline() after ":g"
               has finished all substitutions.
            4. Clear the need_wait_return flag after prompting the user.
相关文件:   src/ex_cmds.c, src/gui_w32.c

Patch 5.4m.14
问题:       When doing "vim xxx", ":opt", ":only" and then ":e xxx" we end
            up with two swapfiles for "xxx".  That is caused by the ":bdel"
            command which is executed when unloading the option-window.
            Also, there was no check if closing a buffer made the new one
            invalid, this could cause a crash.
解决方案:   When closing a buffer causes the current buffer to be deleted,
            use the new buffer to replace it.  Also detect that the new buffer
            has become invalid as a side effect of closing the current one.
            Make autocommand that calls ":bdel" in optwin.vim nested, so that
            the buffer loading it triggers also executes autocommands.
            Also added a test for this in test13.
相关文件:   runtime/optwin.vim, src/buffer.c, src/ex_cmds.c, src/globals.h
            src/testdir/test13.in, src/testdir/test13.ok

Patch 5.4m.15
问题:       When using a BufEnter autocommand to reload the syntax file,
            conversion to HTML caused a crash. (Sung-Hyun Nam)
解决方案:   When using ":syntax clear" the current stack of syntax items was
            not cleared.  This will cause memory to be used that has already
            been freed.  Added call to invalidate_current_state() in
            syntax_clear().
相关文件:   src/syntax.c

Patch 5.4m.17
问题:       When omitting a ')' in an expression it would not be seen as a
            failure.
            When detecting an error inside (), there would be an error message
            for a missing ')' too.
            When using ":echo 1+|echo 2" there was no error message. (Roemer)
            When using ":exe 1+" there was no error message.
            When using ":return 1+" there was no error message.
解决方案:   Fix do_echo(), do_execute() and do_return() to give an error
            message when eval1() returns FAIL.
            Fix eval6() to handle trailing ')' correctly and return FAIL when
            it's missing.
相关文件:   src/eval.c

Patch 5.4m.18
问题:       When using input() from inside an expression entered with
            "<code class="keystroke">CTRL-R</code> =" on the command line, there could be a crash.  And the
            resulting command line was wrong.
解决方案:   Added getcmdline_prompt(), which handles recursive use of
            getcmdline() correctly.  It also sets the command line prompt.
            Removed cmdline_prompt().  Also use getcmdline_prompt() for
            getting the crypt key in get_crypt_key().
相关文件:   src/proto/ex_getln.pro, src/ex_getln.c, src/eval.c, src/misc2.c

Patch 5.4m.21
问题:       When starting up, the screen structures were first allocated at
            the minimal size, then initializations were done with Rows
            possibly different from screen_Rows.  Caused a crash in rare
            situations (GTK with XIM and fontset).
解决方案:   Call screenalloc() in main() only after calling ui_get_winsize().
            Also avoids a potential delay because of calling screenclear()
            while "starting" is non-zero.
相关文件:   src/main.c

Patch 5.4m.22
问题:       In the GUI it was possible that the screen was resized and the
            screen structures re-allocated while redrawing the screen.  This
            could cause a crash (hard to reproduce).  The call sequence goes
            through update_screen() .. syntax_start() .. ui_breakcheck() ..
            gui_resize_window() .. screenalloc().
解决方案:   Set updating_screen while redrawing.  If the window is resized
            remember the new size and handle it only after redrawing is
            finished.
            This also fixes that resizing the screen while still redrawing
            (slow syntax highlighting) would not work properly.
            Also disable display_hint, it was never used.
相关文件:   src/globals.h, src/gui.c, src/screen.c, src/proto/gui.pro

Patch 5.4m.23
问题:       When using expand("<code class="special">&lt;cword&gt;</code>") when there was no word under the
            cursor, would get an error message.  Same for <code class="special">&lt;cWORD&gt;</code> and <code class="special">&lt;cfile&gt;</code>.
解决方案:   Don't give an error message, return an empty string.
相关文件:   src/eval.c

Patch 5.4m.24
问题:       ":help \|" didn't find anything.  It was translated to "/\\|".
解决方案:   Translate "\|" into "\\bar".  First check the table for specific
            translations before checking for "\x".
相关文件:   src/ex_cmds.c

Patch 5.4m.25
问题:       Unix: When using command line completion on files that contain
            ''', '"' or '|' the file name could not be used.
            Adding this file name to the Buffers menu caused an error message.
解决方案:   Insert a backslash before these three characters.
            Adjust Mungename() function to insert a backslash before '|'.
相关文件:   src/ex_getln.c, runtime/menu.vim

Patch 5.4m.26
问题:       When using a mapping of two function keys, e.g., <code class="special">&lt;F1&gt;</code><code class="special">&lt;F1&gt;</code>, and
            only the first char of the second key has been read, the mapping
            would not be recognized.  Noticed on some Unix systems with xterm.
解决方案:   Add 'K' flag to <a href="options.html#'cpoptions'">'cpoptions'</a> to wait for the whole key code, even
            when halfway a mapping.
相关文件:   src/option.h, src/term.c

Patch 5.4m.27
问题:       When making test33 without the lisp feature it hangs. Interrupting
            the execution of the script then might cause a crash.
解决方案:   In inchar(), after closing a script, don't use buf[] anymore.
            closescript() has freed typebuf[] and buf[] might be pointing
            inside typebuf[].
            Avoid that test33 hangs when the lisp feature is missing.
相关文件:   src/getchar.c src/testdir/test33.in

"os2" was missing from the feature list.  Useful for has("os2").

BeOS:
- Included patches from Richard Offer for BeOS R4.5.
- menu code didn't work right.  Crashed in the Buffers menu.  The window title
  wasn't set. (Offer)

Patch 5.4n.3
问题:       C-indenting was wrong after "  } else".  The white space was not
            skipped.  Visible when <a href="options.html#'cino'">'cino'</a> has "+10".
解决方案:   Skip white space before calling cin_iselse(). (Norbert Zeh)
相关文件:   src/misc1.c

Patch 5.4n.4
问题:       When the 't' flag in <a href="options.html#'cpoptions'">'cpoptions'</a> is included, after a
            ":nohlsearch" the search highlighting would not be enabled again
            after a tag search. (Norbert Zeh)
解决方案:   When setting the new search pattern in jumpto_tag(), don't restore
            no_hlsearch.
相关文件:   src/tag.c

Patch 5.4n.5
问题:       When using ":normal" from a CursorHold autocommand Vim hangs.  The
            autocommand is executed down from vgetc().  Calling vgetc()
            recursively to execute the command doesn't work then.
解决方案:   Forbid the use of ":normal" when vgetc_busy is set.  Give an error
            message when this happens.
相关文件:   src/ex_docmd.c, runtime/doc/autocmd.txt

Patch 5.4n.6
问题:       "gv" could reselect a Visual that starts and/or ends past the end
            of a line. (Robert Webb)
解决方案:   Check that the start and end of the Visual area are on a valid
            character by calling adjust_cursor().
相关文件:   src/normal.c

Patch 5.4n.8
问题:       When a mark was on a non existing line (e.g., when the .viminfo
            was edited), jumping to it caused ml_get errors. (Alexey
            Marinichev).
解决方案:   Added check_cursor_lnum() in nv_gomark().
相关文件:   src/normal.c

Patch 5.4n.9
问题:       ":-2" moved the cursor to a negative line number. (Ralf Schandl)
解决方案:   Give an error message for a negative line number.
相关文件:   src/ex_docmd.c

Patch 5.4n.10
问题:       Win32 GUI: At the hit-enter prompt, it was possible to scroll the
            text.  This erased the prompt and made Vim look like it is in
            Normal mode, while it is actually still waiting for a <code class="special">&lt;CR&gt;</code>.
解决方案:   Disallow scrolling at the hit-enter prompt for systems that use
            on the fly scrolling.
相关文件:   src/message.c

Patch 5.4n.14
问题:       Win32 GUI: When using ":winsize 80 46" and the height is more than
            what fits on the screen, the window size was made smaller than
            asked for (that's OK) and Vim crashed (that's not OK)&gt;
解决方案:   Call check_winsize() from gui_set_winsize() to resize the windows.
相关文件:   src/gui.c

Patch 5.4n.16
问题:       Win32 GUI: The <code class="special">&lt;F10&gt;</code> key both selected the menu and was handled as
            a key hit.
解决方案:   Apply <a href="options.html#'winaltkeys'">'winaltkeys'</a> to <code class="special">&lt;F10&gt;</code>, like it is used for Alt keys.
相关文件:   src/gui_w32.c

Patch 5.4n.17
问题:       Local buffer variables were freed when the buffer is unloaded.
            That's not logical, since options are not freed. (Ron Aaron)
解决方案:   Free local buffer variables only when deleting the buffer.
相关文件:   src/buffer.c

Patch 5.4n.19
问题:       Doing ":e" (without argument) in an option-window causes trouble.
            The mappings for <code class="special">&lt;CR&gt;</code> and <code class="special">&lt;Space&gt;</code> are not removed.  When there is
            another buffer loaded, the swap file for it gets mixed up.
            (Steve Mueller)
解决方案:   Also remove the mappings at the BufUnload event, if they are still
            present.
            When re-editing the same file causes the current buffer to be
            deleted, don't try editing it.
            Also added a test for this situation.
相关文件:   runtime/optwin.vim, src/ex_cmds.c, src/testdir/test13.in,
            src/testdir/test13.ok

Patch 5.4n.24
问题:       BeOS: configure never enabled the GUI, because $with_x was "no".
            Unix prototypes caused problems, because Display and Widget are
            undefined.
            Freeing fonts on exit caused a crash.
解决方案:   Only disable the GUI when $with_x is "no" and  $BEOS is not "yes".
            Add dummy defines for Display and Widget in proto.h.
            Don't free the fonts in gui_exit() for BeOS.
相关文件:   src/configure.in, src/configure, src/proto.h, src/gui.c.


The runtime/vim48x48.xpm icon didn't have a transparent background. (Schild)

Some versions of the mingw32/egcs compiler didn't have WINBASEAPI defined.
(Aaron)

VMS:
- mch_setenv() had two arguments instead of three.
- The system vimrc and gvimrc files were called ".vimrc" and ".gvimrc".
  Removed the dot.
- call to RealWaitForChar() had one argument too many. (Campbell)
- WaitForChar() is static, removed the prototype from proto/os_vms.pro.
- Many file accesses failed, because Unix style file names were used.
  Translate file names to VMS style by using vim_fopen().
- Filtering didn't work, because the temporary file name was generated wrong.
- There was an extra newline every 9192 characters when writing a file.  Work
  around it by writing line by line. (Campbell)
- os_vms.c contained "# typedef int DESC".  Should be "typedef int DESC;".
  Only mattered for generating prototypes.
- Added file name translation to many places.  Made easy by defining macros
  mch_access(), mch_fopen(), mch_fstat(), mch_lstat() and mch_stat().
- Set default for <a href="options.html#'tagbsearch'">'tagbsearch'</a> to off, because binary tag searching apparently
  doesn't work for VMS.
- make mch_get_host_name() work with /dec and /standard=vaxc. (Campbell)


Patch 5.4o.2
问题:       Crash when using "gf" on "file.c://comment here". (Scott Graham)
解决方案:   Fix wrong use of pointers in get_file_name_in_path().
相关文件:   src/window.c

Patch 5.4o.3
问题:       The horizontal scrollbar was not sized correctly when <a href="options.html#'number'">'number'</a> is
            set and <a href="options.html#'wrap'">'wrap'</a> not set.
            Athena: Horizontal scrollbar wasn't updated when the cursor was
            positioned with a mouse click just after dragging.
解决方案:   Subtract 8 from the size when <a href="options.html#'number'">'number'</a> set and <a href="options.html#'wrap'">'wrap'</a> not set.
            Reset gui.dragged_sb when a mouse click is received.
相关文件:   src/gui.c

Patch 5.4o.4
问题:       When running in an xterm and $WINDOWID is set to an illegal value,
            Vim would exit with "Vim: Got X error".
解决方案:   When using the display which was opened for the xterm clipboard,
            check if x11_window is valid by trying to obtain the window title.
            Also add a check in setup_xterm_clip(), for when using X calls to
            get the pointer position in an xterm.
相关文件:   src/os_unix.c

Patch 5.4o.5
问题:       Motif version with Lesstif: When removing the menubar and then
            using a menu shortcut key, Vim would crash. (raf)
解决方案:   Disable the menu mnemonics when the menu bar is removed.
相关文件:   src/gui_motif.c

Patch 5.4o.9
问题:       The DOS install.exe program used the "move" program.  That doesn't
            work on Windows NT, where "move" is internal to cmd.exe.
解决方案:   Don't use an external program for moving the executables.  Use C
            functions to copy the file and delete the original.
相关文件:   src/dosinst.c

Motif and Athena obtained the status area height differently from GTK.  Moved
status_area_enabled from global.h to gui_x11.c and call
xim_get_status_area_height() to get the status area height.

Patch 5.4p.1
问题:       When using auto-select, and the "gv" command is used, would not
            always obtain ownership of the selection.  Caused by the Visual
            area still being the same, but ownership taken away by another
            program.
解决方案:   Reset the clipboard Visual mode to force updating the selection.
相关文件:   src/normal.c

Patch 5.4p.2
问题:       Motif and Athena with XIM: Typing 3-byte
            <code class="special">&lt;multibyte&gt;</code><code class="special">&lt;multibyte&gt;</code><code class="special">&lt;space&gt;</code> doesn't work correctly with Ami XIM.
解决方案:   Avoid using key_sym XK_VoidSymbol. (Nam)
相关文件:   src/multbyte.c, src/gui_x11.c

Patch 5.4p.4
问题:       Win32 GUI: The scrollbar values were reduced for a file with more
            than 32767 lines.  But this info was kept global for all
            scrollbars, causing a mixup between the windows.
            Using the down arrow of a scrollbar in a large file didn't work.
            Because of round-off errors there is no scroll at all.
解决方案:   Give each scrollbar its own scroll_shift field.  When the down
            arrow is used, scroll several lines.
相关文件:   src/gui.h, src/gui_w32.c

Patch 5.4p.5
问题:       When changing buffers in a BufDelete autocommand, there could be
            ml_line errors and/or a crash. (Schandl)  Was caused by deleting
            the current buffer.
解决方案:   When the buffer to be deleted unexpectedly becomes the current
            buffer, don't delete it.
            Also added a check for this in test13.
相关文件:   src/buffer.c, src/testdir/test13.in, src/testdir/test13.ok

Patch 5.4p.7
问题:       Win32 GUI: When using <a href="options.html#'mousemodel'">'mousemodel'</a> set to "popup_setpos" and
            clicking the right mouse button outside of the selected area, the
            selected area wasn't removed until the popup menu has gone.
            (Aaron)
解决方案:   Set the cursor and update the display before showing the popup
            menu.
相关文件:   src/normal.c

Patch 5.4p.8
问题:       The generated bugreport didn't contain information about
            $VIMRUNTIME and whether runtime files actually exist.
解决方案:   Added a few checks to the bugreport script.
相关文件:   runtime/bugreport.vim

Patch 5.4p.9
问题:       The windows install.exe created a wrong entry in the popup menu.
            The "%1" was "".  The full directory was included, even when the
            executable had been moved elsewhere. (Ott)
解决方案:   Double the '%' to get one from printf.  Only include the path to
            gvim.exe when it wasn't moved and it's not in $PATH.
相关文件:   src/dosinst.c

Patch 5.4p.10
问题:       Win32: On top of 5.4p.9: The "Edit with Vim" entry sometimes used
            a short file name for a directory.
解决方案:   Change the "%1" to "%L" in the registry entry.
相关文件:   src/dosinst.c

Patch 5.4p.11
问题:       Motif, Athena and GTK: When closing the GUI window when there is a
            changed buffer, there was only an error message and Vim would not
            exit.
解决方案:   Put up a dialog, like for ":confirm qa".  Uses the code that was
            already used for MS-Windows.
相关文件:   src/gui.c, src/gui_w32.c

Patch 5.4p.12
问题:       Win32: Trying to expand a string that is longer than 256
            characters could cause a crash. (Steed)
解决方案:   For the buffer in win32_expandpath() don't use a fixed size array,
            allocate it.
相关文件:   src/os_win32.c

MSDOS: Added "-Wall" to Makefile.djg compile flags.  Function prototypes for
fname_case() and mch_update_cursor() were missing.  "fd" was unused in
mf_sync().  "puiLocation" was unused in myputch().  "newcmd" unused in
mch_call_shell() for DJGPP version.

</section><hr class="doubleline" /><section class=inner>
<h4>5.5 版 本                                               <b class="vimtag"> <a name="version-5.5">version-5.5</a> </b></h4>
5.5 版本是 5.4 的漏洞修正版。


改动                                                    <b class="vimtag"> <a name="changed-5.5">changed-5.5</a> </b>
</section><hr class="singleline" /><section class=inner>

DJGPP 版本现在用 "-O2" 编译而不是 "-O4"，以减少可执行文件的大小。

src/STYLE 文件移到 runtime/doc/develop.txt。加入设计目标。

<a href="options.html#'backspace'">'backspace'</a> 现在成为字符串选项。见 patch 5.4.15。


新增                                                    <b class="vimtag"> <a name="added-5.5">added-5.5</a> </b>
</section><hr class="singleline" /><section class=inner>

加入 Exuberant Ctags 3.3 版本。(Darren Hiebert)

runtime/mswin.vim 里，把 <code class="keystroke">CTRL-Q</code> 映射为 <code class="keystroke">CTRL-V</code>，这样任何 <code class="keystroke">CTRL-V</code> 能做的事情
<code class="keystroke">CTRL-Q</code> 都可以做。

vimrc_example.vim 里支持 bzip2 文件的解压。

如果加入补丁，补丁号在 version.c 表格里输入。这样就可以跳过一个补丁而不影响后
面。

支持 X11 的鼠标滚轮。见 patch 5.5a.14。

line2byte() 可以用来得到缓冲区的大小。见 patch 5.4.35。

用插入模式下的 <code class="keystroke">CTRL-R</code> <code class="keystroke">CTRL-O</code> r 和 <code class="keystroke">CTRL-R</code> <code class="keystroke">CTRL-P</code> r 命令按本义插入寄存器。见
patch 5.4.48。

MS-Windows 的卸载 (uninstall) 程序。可以删除 "Edit with Vim" 的注册表项目。也
进行注册使 "Add/Remove programs" 应用可以找到它。见 patch 5.4.x7。


修正                                                    <b class="vimtag"> <a name="fixed-5.5">fixed-5.5</a> </b>
</section><hr class="singleline" /><section class=inner>

When using vimrc_example.vim: An error message when the cursor is on a line
higher than the number of lines in the compressed file.  Move the autocommand
for jumping to the last known cursor position to after the decompressing
autocommands.

":mkexrc" and ":mksession" wrote the current value of <a href="options.html#'textmode'">'textmode'</a>.  That may
mark a file as modified, which causes problems.  This is a buffer-specific
setting, it should not affect all files.

"vim --version" wrote two empty lines.

Unix: The alarm signal could kill Vim.  It is generated by the Perl alarm()
function.  Ignore SIGALRM.

Win32 GUI: Toolbar still had the yellow bitmap for running a Vim script.

BeOS: "tmo" must be bigtime_t, instead of double. (Seibert)

Patch 5.4.1
问题:       Test11 fails when $GZIP is set to "-v". (Matthew Jackson)
解决方案:   Set $GZIP to an empty string.
相关文件:   src/testdir/test11.in

Patch 5.4.2
问题:       Typing <code class="special">&lt;Esc&gt;</code> at the crypt key prompt caused a crash. (Kallingal)
解决方案:   Check for a NULL pointer returned from get_crypt_key().
相关文件:   src/fileio.c

Patch 5.4.3
问题:       Python: Trying to use the name of an unnamed buffer caused a
            crash. (Daniel Burrows)
解决方案:   Check for b_fname being a NULL pointer.
相关文件:   src/if_python.c

Patch 5.4.4
问题:       Win32: When compiled without toolbar, but the 'T' flag is in
            <a href="options.html#'guioptions'">'guioptions'</a>, there would be an empty space for the toolbar.
解决方案:   Add two #ifdefs where checking for the 'T' flag. (Vince Negri)
相关文件:   src/gui.c

Patch 5.4.5
问题:       Athena GUI: Using the Buffers.Refresh menu entry caused a crash.
            Looks like any ":unmenu" command may cause trouble.
解决方案:   Disallow ":unmenu" in the Athena version.  Disable the Buffers
            menu, because the Refresh item would not work.
相关文件:   src/menu.c, runtime/menu.vim

Patch 5.4.6
问题:       GTK GUI: Using ":gui" in the .gvimrc file caused an error.  Only
            happens when the GUI forks.
解决方案:   Don't fork in a recursive call of gui_start().
相关文件:   src/gui.c

Patch 5.4.7
问题:       Typing 'q' at the more prompt for the ATTENTION message causes the
            file loading to be interrupted. (Will Day)
解决方案:   Reset got_int after showing the ATTENTION message.
相关文件:   src/memline.c

Patch 5.4.8
问题:       Edit some file, ":he", ":opt": options from help window are shown,
            but pressing space updates from the other window. (Phillipps)
            Also: When there are changes in the option-window, ":q!" gives an
            error message.
解决方案:   Before creating the option-window, go to a non-help window.
            Use ":bdel!" to delete the buffer.
相关文件:   runtime/optwin.vim

Patch 5.4.9
            Just updates version.h.  The real patch has been moved to 5.4.x1.
            This patch is just to keep the version number correct.

Patch 5.4.10
问题:       GTK GUI: When $DISPLAY is invalid, "gvim -f" just exits.  It
            should run in the terminal.
解决方案:   Use gtk_init_check() instead of gtk_init().
相关文件:   src/gui_gtk_x11.c

Patch 5.4.11
问题:       When using the 'S' flag in <a href="options.html#'cpoptions'">'cpoptions'</a>, <a href="options.html#'tabstop'">'tabstop'</a> is not copied to
            the next buffer for some commands, e.g., ":buffer".
解决方案:   When the BCO_NOHELP flag is given to buf_copy_options(), still
            copy the options used by do_help() when neither the "from" or "to"
            buffer is a help buffer.
相关文件:   src/option.c

Patch 5.4.12
问题:       When using <a href="options.html#'smartindent'">'smartindent'</a>, there would be no extra indent if the
            current line did not have any indent already. (Hanus Adler)
解决方案:   There was a wrongly placed "else", that previously matched with
            the "if" that set trunc_line.  Removed the "else" and added a
            check for trunc_line to be false.
相关文件:   src/misc1.c

Patch 5.4.13
问题:       New SGI C compilers need another option for optimisation.
解决方案:   Add a check in configure for "-OPT:Olimit". (Chin A Young)
相关文件:   src/configure.in, src/configure

Patch 5.4.14
问题:       Motif GUI: When the popup menu is present, a tiny window appears
            on the desktop for some users.
解决方案:   Set the menu widget ID for a popup menu to 0. (Thomas Koehler)
相关文件:   src/gui_motif.c

Patch 5.4.15
问题:       Since <a href="options.html#'backspace'">'backspace'</a> set to 0 has been made Vi compatible, it is no
            longer possible to only allow deleting autoindent.
解决方案:   Make <a href="options.html#'backspace'">'backspace'</a> a list of parts, to allow each kind of
            backspacing separately.
相关文件:   src/edit.c, src/option.c, src/option.h, src/proto/option.pro,
            runtime/doc/option.txt, runtime/doc/insert.txt

Patch 5.4.16
问题:       Multibyte: Locale zh_TW.Big5 was not checked for in configure.
解决方案:   Add zh_TW.Big5 to configure check. (Chih-Tsun Huang)
相关文件:   src/configure.in, src/configure

Patch 5.4.17
问题:       GUI: When started from inside gvim with ":!gvim", Vim would not
            start.  ":!gvim -f" works fine.
解决方案:   After forking, wait a moment in the parent process, to give the
            child a chance to set its process group.
相关文件:   src/gui.c

Patch 5.4.18
问题:       Python: The clear_history() function also exists in a library.
解决方案:   Rename clear_history() to clear_hist().
相关文件:   src/ex_getln.c, src/eval.c, src/proto/ex_getln.pro

Patch 5.4.19
问题:       In a terminal with 25 lines, there is a more prompt after the
            ATTENTION message.  When hitting 'q' here the dialog prompt
            doesn't appear and file loading is interrupted. (Will Day)
解决方案:   Don't allow quitting the printing of a message for the dialog
            prompt.  Added the msg_noquit_more flag for this.
相关文件:   src/message.c

Patch 5.4.20
问题:       GTK: When starting gvim, would send escape sequences to the
            terminal to switch the cursor off and on.
解决方案:   Don't call msg_start() if the GUI is expected to start.
相关文件:   src/main.c

Patch 5.4.21
问题:       Motif: Toplevel menu ordering was wrong when using tear-off items.
解决方案:   Don't add one to the index for a toplevel menu.
相关文件:   src/gui_motif.c

Patch 5.4.22
问题:       In Insert mode, <code class="special">&lt;C-Left&gt;</code>, <code class="special">&lt;S-Left&gt;</code>, <code class="special">&lt;C-Right&gt;</code> and <code class="special">&lt;S-Right&gt;</code> didn't
            update the column used for vertical movement.
解决方案:   Set curwin-&gt;w_set_curswant for those commands.
相关文件:   src/edit.c

Patch 5.4.23
问题:       When a Visual selection is lost to another program, and then the
            same text is Visually selected again, the clipboard ownership
            wasn't regained.
解决方案:   Set clipboard.vmode to NUL to force regaining the clipboard.
相关文件:   src/normal.c

Patch 5.4.24
问题:       Encryption: When using ":r file" while <a href="options.html#'key'">'key'</a> has already entered,
            the <a href="options.html#'key'">'key'</a> option would be messed up.  When writing the file it
            would be encrypted with an unknown key and lost! (Brad Despres)
解决方案:   Don't free cryptkey when it is equal to the <a href="options.html#'key'">'key'</a> option.
相关文件:   src/fileio.c

Patch 5.4.25
问题:       When <a href="options.html#'cindent'">'cindent'</a> is set, but <a href="options.html#'autoindent'">'autoindent'</a> isn't, comments are not
            properly indented when starting a new line. (Mitterand)
解决方案:   When there is a comment leader for the new line, but <a href="options.html#'autoindent'">'autoindent'</a>
            isn't set, do C-indenting.
相关文件:   src/misc1.c

Patch 5.4.26
问题:       Multi-byte: a multibyte character is never recognized in a file
            name, causing a backslash before it to be removed on Windows.
解决方案:   Assume that a leading-byte character is a file name character in
            vim_isfilec().
相关文件:   src/charset.c

Patch 5.4.27
问题:       Entries in the PopUp[nvic] menus were added for several modes, but
            only deleted for the mode they were used for.  This resulted in
            the  entry remaining in the PopUp menu.
            When removing a PopUp[nvic] menu, the name had been truncated,
            could result in greying-out the whole PopUp menu.
解决方案:   Remove entries for all modes from the PopUp[nvic] menus.  Remove
            the PopUp[nvic] menu entries first, before the name is changed.
相关文件:   src/menu.c

Patch 5.4.28
问题:       When using a BufWritePre autocommand to change <a href="options.html#'fileformat'">'fileformat'</a>, the
            new value would not be used for writing the file.
解决方案:   Check <a href="options.html#'fileformat'">'fileformat'</a> after executing the autocommands instead of
            before.
相关文件:   src/fileio.c

Patch 5.4.29
问题:       Athena GUI: When removing the 'g' flag from <a href="options.html#'guioptions'">'guioptions'</a>, using a
            menu can result in a crash.
解决方案:   Always grey-out menus for Athena, don't hide them.
相关文件:   src/menu.c

Patch 5.4.30
问题:       BeOS: Suspending Vim with <code class="keystroke">CTRL-Z</code> didn't work (killed Vim).  The
            first character typed after ":sh" goes to Vim, instead of the
            started shell.
解决方案:   Don't suspend Vim, start a new shell.  Kill the async read thread
            when starting a new shell.  It will be restarted later. (Will Day)
相关文件:   src/os_unix.c, src/ui.c

Patch 5.4.31
问题:       GUI: When <a href="options.html#'mousefocus'">'mousefocus'</a> is set, moving the mouse over where a
            window boundary was, causes a hit-enter prompt to be finished.
            (Jeff Walker)
解决方案:   Don't use <a href="options.html#'mousefocus'">'mousefocus'</a> at the hit-enter prompt.  Also ignore it
            for the more prompt and a few other situations.  When an operator
            is pending, abort it first.
相关文件:   src/gui.c

Patch 5.4.32
问题:       Unix: $LDFLAGS was not passed to configure.
解决方案:   Pass $LDFLAGS to configure just like $CFLAGS. (Jon Miner)
相关文件:   src/Makefile

Patch 5.4.33
问题:       Unix: After expanding an environment variable with the shell, the
            next expansion would also use the shell, even though it is not
            needed.
解决方案:   Reset "recursive" before returning from gen_expand_wildcards().
相关文件:   src/misc1.c

Patch 5.4.34 (also see 5.4.x5)
问题:       When editing a file, and the file name is relative to a directory
            above the current directory, the file name was made absolute.
            (Gregory Margo)
解决方案:   Add an argument to shorten_fnames() which indicates if all file
            names should be shortened, or only absolute names.  In main() only
            use shorten_fnames() to shorten absolute names.
相关文件:   src/ex_docmd.c, src/fileio.c, src/main.c, src/proto/fileio.pro

Patch 5.4.35
问题:       There is no function to get the current file size.
解决方案:   Allow using line2byte() with the number of lines in the file plus
            one.  This returns the offset of the line past the end of the
            file, which is the file size plus one.
相关文件:   src/eval.c, runtime/doc/eval.txt

Patch 5.4.36
问题:       Comparing strings while ignoring case didn't work correctly for
            some machines. (Mide Steed)
解决方案:   vim_stricmp() and vim_strnicmp() only returned 0 or 1.  Changed
            them to return -1 when the first argument is smaller.
相关文件:   src/misc2.c

Patch 5.4.37 (also see 5.4.40 and 5.4.43)
问题:       Long strings from the viminfo file are truncated.
解决方案:   When writing a long string to the viminfo file, first write a line
            with the length, then the string itself in a second line.
相关文件:   src/eval.c, src/ex_cmds.c, src/ex_getln.c, src/mark.c, src/ops.c,
            src/search.c, src/proto/ex_cmds.pro, runtime/syntax/viminfo.vim

Patch 5.4.38
问题:       In the option-window, ":set go&amp;" resulted in <a href="options.html#'go'">'go'</a> being handled
            like a boolean option.
            Mappings for <code class="special">&lt;Space&gt;</code> and <code class="special">&lt;CR&gt;</code> were overruled by the option-window.
解决方案:   When the value of an option isn't 0 or 1, don't handle it like a
            boolean option.
            Save and restore mappings for <code class="special">&lt;Space&gt;</code> and <code class="special">&lt;CR&gt;</code> when entering and
            leaving the option-window.
相关文件:   runtime/optwin.vim

Patch 5.4.39
问题:       When setting a hidden option, spaces before the equal sign were
            not skipped and cause an error message.  E.g., ":set csprg =cmd".
解决方案:   When skipping over a hidden option, check for a following "=val"
            and skip it too.
相关文件:   src/option.c

Patch 5.4.40 (depends on 5.4.37)
问题:       Compiler error for "atol(p + 1)". (Axel Kielhorn)
解决方案:   Add a typecast: "atol((char *)p + 1)".
相关文件:   src/ex_cmds.c

Patch 5.4.41
问题:       Some commands that were not included would give an error message,
            even when after "if 0".
解决方案:   Don't give an error message for an unsupported command when not
            executing the command.
相关文件:   src/ex_docmd.c

Patch 5.4.42
问题:       ":w" would also cause a truncated message to appear in the message
            history.
解决方案:   Don't put a kept message in the message history when it starts
            with "&lt;".
相关文件:   src/message.c

Patch 5.4.43 (depends on 5.4.37)
问题:       Mixing long lines with multiple lines in a register causes errors
            when writing the viminfo file. (Robinson)
解决方案:   When reading the viminfo file to skip register contents, skip
            lines that start with "&lt;".
相关文件:   src/ops.c

Patch 5.4.44
问题:       When <a href="options.html#'whichwrap'">'whichwrap'</a> includes '~', a "~" command that goes on to the
            next line cannot be properly undone. (Zellner)
解决方案:   Save each line for undo in n_swapchar().
相关文件:   src/normal.c

Patch 5.4.45 (also see 5.4.x8)
问题:       When expand("$ASDF") fails, there is an error message.
解决方案:   Remove the global expand_interactively.  Pass a flag down to skip
            the error message.
            Also: expand("$ASDF") returns an empty string if $ASDF isn't set.
            Previously it returned "$ASDF" when <a href="options.html#'shell'">'shell'</a> is "sh".
            Also: system() doesn't print an error when the command returns an
            error code.
相关文件:   many

Patch 5.4.46
问题:       Backspacing did not always use <a href="options.html#'softtabstop'">'softtabstop'</a> after hitting <code class="special">&lt;CR&gt;</code>,
            inserting a register, moving the cursor, etc.
解决方案:   Reset inserted_space much more often in edit().
相关文件:   src/edit.c

Patch 5.4.47
问题:       When executing BufWritePre or BufWritePost autocommands for a
            hidden buffer, the cursor could be moved to a non-existing
            position. (Vince Negri)
解决方案:   Save and restore the cursor and topline for the current window
            when it is going to be used to execute autocommands for a hidden
            buffer.  Use an existing window for the buffer when it's not
            hidden.
相关文件:   src/fileio.c

Patch 5.4.48
问题:       A paste with the mouse in Insert mode was not repeated exactly the
            same with ".".  For example, when <a href="options.html#'autoindent'">'autoindent'</a> is set and pasting
            text with leading indent. (Perry)
解决方案:   Add the <code class="keystroke">CTRL-R</code> <code class="keystroke">CTRL-O</code> r and <code class="keystroke">CTRL-R</code> <code class="keystroke">CTRL-P</code> r commands in Insert
            mode, which insert the contents of a register literally.
相关文件:   src/edit.c, src/normal.c, runtime/doc/insert.txt

Patch 5.4.49
问题:       When pasting text with [ <code class="special">&lt;MiddleMouse&gt;</code>, the cursor could end up
            after the last character of the line.
解决方案:   Correct the cursor position for the change in indent.
相关文件:   src/ops.c

Patch 5.4.x1 (<code class="note">note:</code> Replaces patch 5.4.9)
问题:       Win32 GUI: menu hints were never used, because WANT_MENU is not
            defined until vim.h is included.
解决方案:   Move the #ifdef WANT_MENU from where MENUHINTS is defined to where
            it is used.
相关文件:   src/gui_w32.c

Patch 5.4.x2
问题:       BeOS: When pasting text, one character was moved to the end.
解决方案:   Re-enable the BeOS code in fill_input_buf(), and fix timing out
            with acquire_sem_etc(). (Will Day)
相关文件:   src/os_beos.c, src/ui.c

Patch 5.4.x3
问题:       Win32 GUI: When dropping a directory on a running gvim it crashes.
解决方案:   Avoid using a NULL file name.  Also display a message to indicate
            that the current directory was changed.
相关文件:   src/gui_w32.c

Patch 5.4.x4
问题:       Win32 GUI: Removing an item from the popup menu doesn't work.
解决方案:   Don't remove the item from the menubar, but from the parent popup
            menu.
相关文件:   src/gui_w32.c

Patch 5.4.x5 (addition to 5.4.34)
相关文件:   src/gui_w32.c

Patch 5.4.x6
问题:       Win32: Expanding (dir)name starting with a dot doesn't work.
            (McCormack)  Only when there is a path before it.
解决方案:   Fix the check, done before expansion, if the file name pattern
            starts with a dot.
相关文件:   src/os_win32.c

Patch 5.4.x7
问题:       Win32 GUI: Removing "Edit with Vim" from registry is difficult.
解决方案:   Add uninstall program to remove the registry keys. It is installed
            in the "Add/Remove programs" list for ease of use.
            Also: don't set $VIM when the executable is with the runtime files.
            Also: Add a text file with a step-by-step description of how to
            uninstall Vim for DOS and Windows.
相关文件:   src/uninstal.c, src/dosinst.c, src/Makefile.w32, uninstal.txt

Patch 5.4.x8 (addition to 5.4.45)
相关文件:   many

Patch 5.4.x9
问题:       Win32 GUI: After executing an external command, focus is not
            always regained (when using focus-follows-mouse).
解决方案:   Add SetFocus() in mch_system(). (Mike Steed)
相关文件:   src/os_win32.c


Patch 5.5a.1
问题:       ":let @* = @:" did not work.  The text was not put on the
        I   clipboard.  (Fisher)
解决方案:   Own the clipboard and put the text on it.
相关文件:   src/ops.c

Patch 5.5a.2
问题:       append() did not mark the buffer modified.  Marks below the
            new line were not adjusted.
解决方案:   Fix the f_append() function.
相关文件:   src/eval.c

Patch 5.5a.3
问题:       Editing compressed ".gz" files doesn't work on non-Unix systems,
            because there is no "mv" command.
解决方案:   Add the rename() function and use it instead of ":!mv".
            Also: Disable the automatic jump to the last position, because it
            changes the jumplist.
相关文件:   src/eval.c, runtime/doc/eval.txt, runtime/vimrc_example.vim

Patch 5.5a.4
问题:       When using whole-line completion in insert mode while the cursor
            is in the indent, get "out of memory" error. (Stekrt)
解决方案:   Don't allocate a negative amount of memory in ins_complete().
相关文件:   src/edit.c

Patch 5.5a.5
问题:       Win32: The <a href="options.html#'path'">'path'</a> option can hold only up to 256 characters,
            because _MAX_PATH is 256.  (Robert Webb)
解决方案:   Use a fixed path length of 1024.
相关文件:   src/os_win32.h

Patch 5.5a.6
问题:       Compiling with gcc on Win32, using the Unix Makefile, didn't work.
解决方案:   Add $(SUFFIX) to all places where an executable is used.  Also
            pass it to ctags.  (Reynolds)
相关文件:   src/Makefile

Patch 5.5a.7
问题:       When using "cat | vim -" in an xterm, the xterm version reply
            would end up in the file.
解决方案:   Read the file from stdin before switching the terminal to RAW
            mode.  Should also avoid problems with programs that use a
            specific terminal setting.
            Also: when using the GUI, print "Reading from stdin..." in the GUI
            window, to give a hint why it doesn't do anything.
相关文件:   src/main.c, src/fileio.c

Patch 5.5a.8
问题:       On multi-threaded Solaris, suspending doesn't work.
解决方案:   Call pause() when the SIGCONT signal was not received after
            sending the SIGTSTP signal. (Nagano)
相关文件:   src/os_unix.c

Patch 5.5a.9
问题:       <a href="options.html#'winaltkeys'">'winaltkeys'</a> could be set to an empty argument, which is illegal.
解决方案:   Give an error message when doing ":set winaltkeys=".
相关文件:   src/option.c

Patch 5.5a.10
问题:       Win32 console: Using ALTGR on a German keyboard to produce "}"
            doesn't work, because the 8th bit is set when ALT is pressed.
解决方案:   Don't set the 8th bit when ALT and CTRL are used. (Leipert)
相关文件:   src/os_win32.c

Patch 5.5a.11
问题:       Tcl: Configure always uses tclsh8.0.
            Also: Loading a library doesn't work.
解决方案:   Add "--with-tclsh" configure argument to allow specifying another
            name for the tcl shell.
            Call Tcl_Init() in tclinit() to make loading libraries work.
            (Johannes Zellner)
相关文件:   src/configure.in, src/configure, src/if_tcl.c

Patch 5.5a.12
问题:       The "user_commands" feature is called "user-commands".
解决方案:   Replace "user-commands" with "user_commands". (Kim Sung-bom)
            Keep "user-commands" for the has() function, to remain backwards
            compatible with 5.4.
相关文件:   src/eval.c, src/version.c

Patch 5.5a.13
问题:       OS/2: When $HOME is not defined, "C:/" is used for the viminfo
            file.  That is very wrong when OS/2 is on another partition.
解决方案:   Use $VIM for the viminfo file when it is defined, like for MSDOS.
            Also: Makefile.os2 didn't depend on os_unix.h.
相关文件:   src/os_unix.h, src/Makefile.os2

Patch 5.5a.14
问题:       Athena, Motif and GTK: The Mouse scroll wheel doesn't work.
解决方案:   Interpret a click of the wheel as a key press of the <code class="special">&lt;MouseDown&gt;</code>
            or <code class="special">&lt;MouseUp&gt;</code> keys.  Default behavior is to scroll three lines, or
            a full page when Shift is used.
相关文件:   src/edit.c, src/ex_getln.c, src/gui.c, src/gui_gtk_x11.c,
            src/gui_x11.c, src/keymap.h, src/message.c, src/misc1.c,
            src/misc2.c, src/normal.c,  src/proto/normal.pro, src/vim.h,
            runtime/doc/scroll.txt

Patch 5.5a.15
问题:       Using <code class="keystroke">CTRL-A</code> in Insert mode doesn't work correctly when the insert
            started with the <code class="special">&lt;Insert&gt;</code> key. (Andreas Rohrschneider)
解决方案:   Replace <code class="special">&lt;Insert&gt;</code> with "i" before setting up the redo buffer.
相关文件:   src/normal.c

Patch 5.5a.16
问题:       VMS: GUI does not compile and run.
解决方案:   Various fixes. (Zoltan Arpadffy)
            Moved functions from os_unix.c to ui.c, so that VMS can use them
            too: open_app_context(), x11_setup_atoms() and clip_x11* functions.
            Made xterm_dpy global, it's now used by ui.c and os_unix.c.
            Use gethostname() always, sys_hostname doesn't exist.
相关文件:   src/globals.h, src/gui_x11.c, src/os_vms.mms, src/os_unix.c,
            src/os_vms.c, src/ui.c, src/proto/os_unix.pro, src/proto/ui.pro

Renamed AdjustCursorForMultiByteCharacter() to AdjustCursorForMultiByteChar()
to avoid symbol length limit of 31 characters. (Steve P. Wall)

Patch 5.5b.1
问题:       SASC complains about dead assignments and implicit type casts.
解决方案:   Removed the dead assignments.  Added explicit type casts.
相关文件:   src/buffer.c, src/edit.c, src/eval.c, src/ex_cmds.c,
            src/ex_getln.c, src/fileio.c, src/getchar.c, src/memline.c,
            src/menu.c, src/misc1.c, src/normal.c, src/ops.c, src/quickfix.c,
            src/screen.c

Patch 5.5b.2
问题:       When using "<code class="keystroke">CTRL-O</code> O" in Insert mode, hit <code class="special">&lt;Esc&gt;</code> and then "o" in
            another line truncates that line. (Devin Weaver)
解决方案:   When using a command that starts Insert mode from <code class="keystroke">CTRL-O</code>, reset
            "restart_edit" first.  This avoids that edit() is called with a
            mix of starting a new edit command and restarting a previous one.
相关文件:   src/normal.c

</section><hr class="doubleline" /><section class=inner>
<h4>5.6 版 本                                               <b class="vimtag"> <a name="version-5.6">version-5.6</a> </b></h4>
5.6 版本是 5.5 的漏洞修正版。


改动                                                    <b class="vimtag"> <a name="changed-5.6">changed-5.6</a> </b>
</section><hr class="singleline" /><section class=inner>

OleVim 文件的小改动。(Christian Schaller)

src/version.c 的补丁号之间加入 "/**/"。提供一行上下文，有些版本的 patch 需要如
此。

重新排列 Syntax 菜单，避免子菜单过长。删除字母表项目的键盘快捷键，避免和固定项
目发生冲突。


新增                                                    <b class="vimtag"> <a name="added-5.6">added-5.6</a> </b>
</section><hr class="singleline" /><section class=inner>

加入 Exuberant Ctags 3.4 版本。(Darren Hiebert)

Python 的 OpenWithVim。(Christian Schaller)

Win32 GUI: gvimext.dll，用于关联菜单 "Edit with Vim" 项目。避免了 MS Office
任务栏上报告的问题。现在用作外壳扩展。(Tianmiao Hu)

新语法文件:
abel            Abel (John Cook)
aml             Arc Macro Language (Nikki Knuit)
apachestyle     Apache-style config file (Christian Hammers)
cf              Cold Fusion (Jeff Lanzarotta)
ctrlh           带有 <code class="keystroke">CTRL-H</code> 序列的文件 (Bram Moolenaar)
cupl            CUPL (John Cook)
cuplsim         CUPL simulation (John Cook)
erlang          Erlang (Kresimir Marzic)
gedcom          Gedcom (Paul Johnson)
icon            Icon (Wendell Turner)
ist             MakeIndex style (Peter Meszaros)
jsp             Java Server Pages (Rafael Garcia-Suarez)
rcslog          Rcslog (Joe Karthauser)
remind          Remind (Davide Alberani)
sqr             Structured Query Report Writer (Paul Moore)
tads            TADS (Amir Karger)
texinfo         Texinfo (Sandor Kopanyi)
xpm2            X Pixmap v2 (Steve Wall)

用 <a href="options.html#'cpoptions'">'cpoptions'</a> 的 'C' 标志位可以关闭源代码行的连接功能。见下 patch 5.5.013。
 <a href="repeat.html#line-continuation">line-continuation</a> 

":syntax" 命令的 "excludenl" 参数。见下 patch 5.5.032。 <a href="syntax.html#:syn-excludenl">:syn-excludenl</a> 

实现  <a href="scroll.html#z+">z+</a>  和  <a href="scroll.html#z^">z^</a>  命令。见下 patch 5.5.050。

Corel Draw 格式的 Vim 标志 (logo)。可以使用任何精度的比例。


修正                                                    <b class="vimtag"> <a name="fixed-5.6">fixed-5.6</a> </b>
</section><hr class="singleline" /><section class=inner>

Using this mapping in Select mode, terminated completion:
":vnoremap <code class="special">&lt;C-N&gt;</code> <code class="special">&lt;Esc&gt;</code>a<code class="special">&lt;C-N&gt;</code>" (Benji Fisher)
Ignore K_SELECT in ins_compl_prep().

VMS (Zoltan Arpadffy, David Elins):
- ioctl() in pty.c caused trouble, #ifndef VMS added.
- Cut &amp; paste mismatch corrected.
- Popup menu line crash corrected.  (Patch 5.5.047)
- Motif directories during open and save as corrected.
- Handle full file names with version numbers. (Patch 5.5.046)
- Directory handling (CD command etc.)
- Corrected file name conversion VMS to Unix and v.v.
- Recovery was not working.
- Terminal and signal handling was outdated compared to os_unix.c.
- Improved os_vms.txt.

Configure used fprintf() instead of printf() to check for __DATE__ and
__TIME__. (John Card II)

BeOS: Adjust computing the char_height and char_ascent.  Round them up
separately, avoids redrawing artifacts. (Mike Steed)

Fix a few multibyte problems in menu_name_skip(), set_reg_ic(), searchc() and
findmatchlimit(). (Taro Muraoka)

GTK GUI:
- With GTK 1.2.5 and later the scrollbars were not redrawn correctly.
- Adjusted the gtk_form_draw() function.
- SNiFF connection didn't work.
- <a href="options.html#'mousefocus'">'mousefocus'</a> was not working. (Dalecki)
- Some keys were not working with modifiers: Shift-Tab, Ctrl-Space and <code class="keystroke">CTRL-@</code>.


Patch 5.5.001
问题:       Configure in the top directory did not pass on an argument with a
            space correctly.  For example "./configure --previs="/My home".
            (Stephane Chazelas)
解决方案:   Use '"$@"' instead of '$*' to pass on the arguments.
相关文件:   configure

Patch 5.5.002
问题:       Compilation error for using "fds[] &amp; POLLIN". (Jeff Walker)
解决方案:   Use "fds[].revents &amp; POLLIN".
相关文件:   src/os_unix.c

Patch 5.5.003
问题:       The autoconf check for sizeof(int) is wrong on machines where
            sizeof(size_t) != sizeof(int).
解决方案:   Use our own configure check.  Also fixes the warning for
            cross-compiling.
相关文件:   src/configure.in, src/configure

Patch 5.5.004
问题:       On Unix it's not possible to interrupt ":sleep 100".
解决方案:   Switch terminal to cooked mode while asleep, to allow a SIGINT to
            wake us up.  But switch off echo, added TMODE_SLEEP.
相关文件:   src/term.h, src/os_unix.c

Patch 5.5.005
问题:       When using <code class="special">&lt;f-args&gt;</code> with a user command, an empty argument to the
            command resulted in one empty string, while no string was
            expected.
解决方案:   Catch an empty argument and pass no argument to the function.
            (Paul Moore)
相关文件:   src/ex_docmd.c

Patch 5.5.006
问题:       Python: When platform-dependent files are in another directory
            than the platform-independent files it doesn't work.
解决方案:   Also check the executable directory, and add it to CFLAGS. (Tessa
            Lau)
相关文件:   src/configure.in, src/configure

Patch 5.5.007 (extra)
问题:       Win32 OLE: Occasional crash when exiting while still being used
            via OLE.
解决方案:   Move OleUninitialize() to before deleting the application object.
            (Vince Negri)
相关文件:   src/if_ole.cpp

Patch 5.5.008
问题:       10000@@ takes a long time and cannot be interrupted.
解决方案:   Check for <code class="keystroke">CTRL-C</code> typed while in the loop to push the register.
相关文件:   src/normal.c

Patch 5.5.009
问题:       Recent Sequent machines don't link with "-linet". (Kurtis Rader)
解决方案:   Remove configure check for Sequent.
相关文件:   src/configure.in, src/configure

Patch 5.5.010
问题:       Ctags freed a memory block twice when exiting.  When out of
            memory, a misleading error message was given.
解决方案:   Update to ctags 3.3.2.  Also fixes a few other problems. (Darren
            Hiebert)
相关文件:   src/ctags/*

Patch 5.5.011
问题:       After "<code class="keystroke">CTRL-V</code> s", the cursor jumps back to the start, while all
            other operators leave the cursor on the last changed character.
            (Xiangjiang Ma)
解决方案:   Position cursor on last changed character, if possible.
相关文件:   src/ops.c

Patch 5.5.012
问题:       Using <code class="keystroke">CTRL-]</code> in Visual mode doesn't work when the text includes a
            space (just where it's useful). (Stefan Bittner)
解决方案:   Don't escape special characters in a tag name with a backslash.
相关文件:   src/normal.c

Patch 5.5.013
问题:       The ":append" and ":insert" commands allow using a leading
            backslash in a line.  The ":source" command concatenates those
            lines. (Heinlein)
解决方案:   Add the 'C' flag in <a href="options.html#'cpoptions'">'cpoptions'</a> to switch off concatenation.
相关文件:   src/ex_docmd.c, src/option.h, runtime/doc/options.txt,
            runtime/filetype.vim, runtime/scripts.vim

Patch 5.5.014
问题:       When executing a register with ":@", the ":append" command would
            get text lines with a ':' prepended. (Heinlein)
解决方案:   Remove the ':' characters.
相关文件:   src/ex_docmd.c, src/ex_getln.c, src/globals.h

Patch 5.5.015
问题:       When using ":g/pat/p", it's hard to see where the output starts,
            the ":g" command is overwritten.  Vi keeps the ":g" command.
解决方案:   Keep the ":g" command, but allow overwriting it with the report
            for the number of changes.
相关文件:   src/ex_cmds.c

Patch 5.5.016 (extra)
问题:       Win32: Using regedit to install Vim in the popup menu requires the
            user to confirm this in a dialog.
解决方案:   Use "regedit /s" to avoid the dialog
相关文件:   src/dosinst.c

Patch 5.5.017
问题:       If an error occurs when closing the current window, Vim could get
            stuck in the error handling.
解决方案:   Don't set curwin to NULL when closing the current window.
相关文件:   src/window.c

Patch 5.5.018
问题:       Absolute paths in shell scripts do not always work.
解决方案:   Use /usr/bin/env to find out the path.
相关文件:   runtime/doc/vim2html.pl, runtime/tools/efm_filter.pl,
            runtime/tools/shtags.pl

Patch 5.5.019
问题:       A function call in <a href="options.html#'statusline'">'statusline'</a> stops using ":q" twice from
            exiting, when the last argument hasn't been edited.
解决方案:   Don't decrement quitmore when executing a function. (Madsen)
相关文件:   src/ex_docmd.c

Patch 5.5.020
问题:       When the output of <code class="keystroke">CTRL-D</code> completion in the commandline goes all
            the way to the last column, there is an empty line.
解决方案:   Don't add a newline when the cursor wrapped already. (Madsen)
相关文件:   src/ex_getln.c

Patch 5.5.021
问题:       When checking if a file name in the tags file is relative,
            environment variables were not expanded.
解决方案:   Expand the file name before checking if it is relative. (Madsen)
相关文件:   src/tag.c

Patch 5.5.022
问题:       When setting or resetting <a href="options.html#'paste'">'paste'</a> the ruler wasn't updated.
解决方案:   Update the status lines when <a href="options.html#'ruler'">'ruler'</a> changes because of <a href="options.html#'paste'">'paste'</a>.
相关文件:   src/option.c

Patch 5.5.023
问题:       When editing a new file and autocommands change the cursor
            position, the cursor was moved back to the first non-white, unless
            <a href="options.html#'startofline'">'startofline'</a> was reset.
解决方案:   Keep the new column, just like the line number.
相关文件:   src/ex_cmds.c

Patch 5.5.024 (extra)
问题:       Win32 GUI: When using confirm() to put up a dialog without a
            default button, the dialog would not have keyboard focus.
            (Krishna)
解决方案:   Always set focus to the dialog window.  Only set focus to a button
            when a default one is specified.
相关文件:   src/gui_w32.c

Patch 5.5.025
问题:       When using "keepend" in a syntax region, a contained match that
            includes the end-of-line could still force that region to
            continue, if there is another contained match in between.
解决方案:   Check the keepend_level in check_state_ends().
相关文件:   src/syntax.c

Patch 5.5.026
问题:       When starting Vim in a white-on-black xterm, with <a href="options.html#'bg'">'bg'</a> set to
            "dark", and then starting the GUI with ":gui", setting <a href="options.html#'bg'">'bg'</a> to
            "light" in the gvimrc, the highlighting isn't set.  (Tsjokwing)
解决方案:   Set the highlighting when <a href="options.html#'bg'">'bg'</a> is changed in the gvimrc, even
            though full_screen isn't set.
相关文件:   src/option.c

Patch 5.5.027
问题:       Unix: os_unix.c doesn't compile when XTERM_CLIP is used but
            WANT_TITLE isn't. (Barnum)
解决方案:   Move a few functions that are used by the X11 title and clipboard
            and put another "#if" around it.
相关文件:   src/os_unix.c

Patch 5.5.028 (extra)
问题:       Win32 GUI: When a file is dropped on Win32 gvim while at the ":"
            prompt, the file is edited but the command line is actually still
            there, the cursor goes back to command line on the next command.
            (Krishna)
解决方案:   When dropping a file or directory on gvim while at the ":" prompt,
            insert the name of the file/directory.  Allows using the
            file/directory name for any Ex command.
相关文件:   src/gui_w32.c

Patch 5.5.029
问题:       "das" at the end of the file didn't delete the last character of
            the sentence.
解决方案:   When there is no character after the sentence, make the operation
            inclusive in current_sent().
相关文件:   src/search.c

Patch 5.5.030
问题:       Unix: in os_unix.c, "term_str" is used, which is also defined in
            vim.h as a macro. (wuxin)
解决方案:   Renamed "term_str" to "buf" in do_xterm_trace().
相关文件:   src/os_unix.c

Patch 5.5.031 (extra)
问题:       Win32 GUI: When exiting Windows, gvim will leave swap files behind
            and will be killed ungracefully. (Krishna)
解决方案:   Catch the WM_QUERYENDSESSION and WM_ENDSESSION messages and try to
            exit gracefully.  Allow the user to cancel the shutdown if there
            is a changed buffer.
相关文件:   src/gui_w32.c

Patch 5.5.032
问题:       Patch 5.5.025 wasn't right.  And C highlighting was still not
            working correctly for a #define.
解决方案:   Added "excludenl" argument to ":syntax", to be able not to extend
            a containing item when there is a match with the end-of-line.
相关文件:   src/syntax.c, runtime/doc/syntax.txt, runtime/syntax/c.vim

Patch 5.5.033
问题:       When reading from stdin, a long line in viminfo would mess up the
            file message.  readfile() uses IObuff for keep_msg, which could be
            overwritten by anyone.
解决方案:   Copy the message from IObuff to msg_buf and set keep_msg to that.
            Also change vim_fgets() to not use IObuff any longer.
相关文件:   src/fileio.c

Patch 5.5.034
问题:       "gvim -rv" caused a crash.  Using <a href="term.html#'t_Co'">'t_Co'</a> before it's set.
解决方案:   Don't try to initialize the highlighting before it has been
            initialized from main().
相关文件:   src/syntax.c

Patch 5.5.035
问题:       GTK with XIM: Resizing with status area was messy, and
            ":set guioptions+=b" didn't work.
解决方案:   Make status area a separate widget, but not a separate window.
            (Chi-Deok Hwang)
相关文件:   src/gui_gtk_f.c, src/gui_gtk_x11.c, src/multbyte.c

Patch 5.5.036
问题:       The GZIP_read() function in $VIMRUNTIME/vimrc_example.vim to
            uncompress a file did not do detection for <a href="options.html#'fileformat'">'fileformat'</a>.  This is
            because the filtering is done with <a href="options.html#'binary'">'binary'</a> set.
解决方案:   Split the filtering into separate write, filter and read commands.
相关文件:   runtime/vimrc_example.vim

Patch 5.5.037
问题:       The "U" command didn't mark the buffer as changed. (McCormack)
解决方案:   Set the <a href="options.html#'modified'">'modified'</a> flag when using "U".
相关文件:   src/undo.c

Patch 5.5.038
问题:       When typing a long ":" command, so that the screen scrolls up,
            causes the hit-enter prompt, even though the user just typed
            return to execute the command.
解决方案:   Reset need_wait_return if (part of) the command was typed in
            getcmdline().
相关文件:   src/ex_getln.c

Patch 5.5.039
问题:       When using a custom status line, "%a" (file # of #) reports the
            index of the current window for all windows.
解决方案:   Pass a window pointer to append_arg_number(), and pass the window
            being updated from build_stl_str_hl(). (Stephen P. Wall)
相关文件:   src/buffer.c, src/screen.c, src/proto/buffer.pro

Patch 5.5.040
问题:       Multi-byte: When there is some error in xim_real_init(), it can
            close XIM and return.  After this there can be a segv.
解决方案:   Test "xic" for being non-NULL, don't set "xim" to NULL.  Also try
            to find more matches for supported styles. (Sung-Hyun Nam)
相关文件:   src/multbyte.c

Patch 5.5.041
问题:       X11 GUI: <code class="keystroke">CTRL-_</code> requires the SHIFT key only on some machines.
解决方案:   Translate <code class="keystroke">CTRL--</code> to <code class="keystroke">CTRL-_</code>. (Robert Webb)
相关文件:   src/gui_x11.c

Patch 5.5.042
问题:       X11 GUI: keys with ALT were assumed to be used for the menu, even
            when the menu has been disabled by removing 'm' from <a href="options.html#'guioptions'">'guioptions'</a>.
解决方案:   Ignore keys with ALT only when gui.menu_is_active is set. (Raf)
相关文件:   src/gui_x11.c

Patch 5.5.043
问题:       GTK: Handling of fontset fonts was not right when <a href="options.html#'guifontset'">'guifontset'</a>
            contains exactly 14 times '-'.
解决方案:   Avoid setting fonts when working with a fontset. (Sung-Hyun Nam)
相关文件:   src/gui_gtk_x11.c

Patch 5.5.044
问题:       pltags.pl contains an absolute path "/usr/local/bin/perl".  That
            might not work everywhere.
解决方案:   Use "/usr/bin/env perl" instead.
相关文件:   runtime/tools/pltags.pl

Patch 5.5.045
问题:       Using "this_session" variable does not work, requires preceding it
            with "v:".  Default filename for ":mksession" isn't mentioned
            in the docs. (Fisher)
解决方案:   Support using "this_session" to be backwards compatible.
相关文件:   src/eval.c, runtime/doc/options.txt

Patch 5.5.046 (extra)
问题:       VMS: problems with path and filename.
解决方案:   Truncate file name at last ';', etc. (Zoltan Arpadffy)
相关文件:   src/buffer.c, src/fileio.c, src/gui_motif.c, src/os_vms.c,
            src/proto/os_vms.pro

Patch 5.5.047
问题:       VMS: Crash when using the popup menu
解决方案:   Turn the #define MENU_MODE_CHARS into an array. (Arpadffy)
相关文件:   src/structs.h, src/menu.c

Patch 5.5.048
问题:       HP-UX 11: Compiling doesn't work, because both string.h and
            strings.h are included. (Squassabia)
解决方案:   The configure test for including both string.h and strings.h
            must include &lt;Xm/Xm.h&gt; first, because it causes problems.
相关文件:   src/configure.in, src/configure, src/config.h.in

Patch 5.5.049
问题:       Unix: When installing Vim, the protection bits of files might be
            influenced by the umask.
解决方案:   Add $(FILEMOD) to Makefile. (Shetye)
相关文件:   src/Makefile

Patch 5.5.050
问题:       "z+" and "z^" commands are missing.
解决方案:   Implemented "z+" and "z^".
相关文件:   src/normal.c, runtime/doc/scroll.txt, runtime/doc/index.txt

Patch 5.5.051
问题:       Several Unix systems have a problem with the optimization limits
            check in configure.
解决方案:   Removed the configure check, let the user add it manually in
            Makefile or the environment.
相关文件:   src/configure.in, src/configure, src/Makefile

Patch 5.5.052
问题:       Crash when using a cursor key at the ATTENTION prompt. (Alberani)
解决方案:   Ignore special keys at the console dialog.  Also ignore characters
            &gt; 255 for other uses of tolower() and toupper().
相关文件:   src/menu.c, src/message.c, src/misc2.c

Patch 5.5.053
问题:       Indenting is wrong after a function when <a href="options.html#'cino'">'cino'</a> has "fs".  Another
            problem when <a href="options.html#'cino'">'cino'</a> has "{s".
解决方案:   Put line after closing "}" of a function at the left margin.
            Apply ind_open_extra in the right way after a '{'.
相关文件:   src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok

Patch 5.5.054
问题:       Unix: ":e #" doesn't work if the alternate file name contains a
            space or backslash. (Hudacek)
解决方案:   When replacing "#", "%" or other items that stand for a file name,
            prepend a backslash before special characters.
相关文件:   src/ex_docmd.c

Patch 5.5.055
问题:       Using "<code class="special">&lt;C-V&gt;</code>$r-" in blockwise Visual mode replaces one character
            beyond the end of the line. (Zivkov)
解决方案:   Only replace existing characters.
相关文件:   src/ops.c

Patch 5.5.056
问题:       After "z20<code class="special">&lt;CR&gt;</code>" messages were printed at the old command line
            position once.  (Veselinovic)
解决方案:   Set msg_row and msg_col when changing cmdline_row in
            win_setheight().
相关文件:   src/window.c

Patch 5.5.057
问题:       After "S<code class="special">&lt;Esc&gt;</code>" it should be possible to restore the line with "U".
            (Veselinovic)
解决方案:   Don't call u_clearline() in op_delete() when changing only one
            line.
相关文件:   src/ops.c

Patch 5.5.058
问题:       Using a long search pattern and then "n" causes the hit-enter
            prompt.  (Krishna)
解决方案:   Truncate the echoed pattern, like other messages.  Moved code for
            truncating from msg_attr() to msg_strtrunc().
相关文件:   src/message.c, src/proto/message.pro, src/search.c

Patch 5.5.059
问题:       GTK GUI: When $term is invalid, using "gvim" gives an error
            message, even though $term isn't really used.  (Robbins)
解决方案:   When the GUI is about to start, skip the error messages for a
            wrong $term.
相关文件:   src/term.c

Patch 5.5.060 (extra)
问题:       Dos 32 bit: When a directory in <a href="options.html#'backupdir'">'backupdir'</a> doesn't exist, ":w"
            causes the file to be renamed to "axlqwqhy.ba~". (Matzdorf)
解决方案:   The code to work around a LFN bug in Windows 95 doesn't handle a
            non-existing target name correctly.  When renaming fails, make
            sure the file has its original name.  Also do this for the Win32
            version, although it's unlikely that it runs into this problem.
相关文件:   src/os_msdos.c, src/os_win32.c

Patch 5.5.061
问题:       When using "\:" in a modeline, the backslash is included in the
            option value. (Mohsin)
解决方案:   Remove one backslash before the ':' in a modeline.
相关文件:   src/buffer.c, runtime/doc/options.txt

Patch 5.5.062 (extra)
问题:       Win32 console: Temp files are created in the root of the current
            drive, which may be read-only. (Peterson)
解决方案:   Use the same mechanism of the GUI version: Use $TMP, $TEMP or the
            current directory.  Cleaned up vim_tempname() a bit.
相关文件:   src/fileio.c, src/os_win32.h, runtime/doc/os_dos.txt

Patch 5.5.063
问题:       When using whole-line completion in Insert mode, <a href="options.html#'cindent'">'cindent'</a> is
            applied, even after changing the indent of the line.
解决方案:   Don't reindent the completed line after inserting/removing indent.
            (Robert Webb)
相关文件:   src/edit.c

Patch 5.5.064
问题:       has("sniff") doesn't work correctly.
解决方案:   Return 1 when Vim was compiled with the +sniff feature. (Pruemmer)
相关文件:   src/eval.c

Patch 5.5.065
问题:       When dropping a file on Vim, the <a href="options.html#'shellslash'">'shellslash'</a> option is not
            effective. (Krishna)
解决方案:   Fix the slashes in the dropped file names according to
            <a href="options.html#'shellslash'">'shellslash'</a>.
相关文件:   src/ex_docmd.c, runtime/doc/options.txt

Patch 5.5.066
问题:       For systems with backslash in file name: Setting a file name
            option to a value starting with "\\machine" removed a backslash.
解决方案:   Keep the double backslash for "\\machine", but do change
            "\\\\machine" to "\\machine" for backwards compatibility.
相关文件:   src/option.c, runtime/doc/options.txt

Patch 5.5.067
问题:       With <a href="options.html#'hlsearch'">'hlsearch'</a> set, the pattern "\&gt;" doesn't highlight the first
            match in a line. (Benji Fisher)
解决方案:   Fix highlighting an empty match.  Also highlight the first
            character in an empty line for "$".
相关文件:   src/screen.c

Patch 5.5.068
问题:       Crash when a ":while" is used with an argument that has an error.
            (Sylvain Viart)
解决方案:   Was using an uninitialized index in the cs_line[] array.  The
            crash only happened when the index was far off.  Made sure the
            uninitialized index isn't used.
相关文件:   src/ex_docmd.c

Patch 5.5.069
问题:       Shifting lines in blockwise Visual mode didn't set the <a href="options.html#'modified'">'modified'</a>
            flag.
解决方案:   Do set the <a href="options.html#'modified'">'modified'</a> flag.
相关文件:   src/ops.c

Patch 5.5.070
问题:       When editing a new file, creating that file outside of Vim, then
            editing it again, ":w" still warns for overwriting an existing
            file. (Nam)
解决方案:   The BF_NEW flag in the "b_flags" field wasn't cleared properly.
相关文件:   src/buffer.c, src/fileio.c

Patch 5.5.071
问题:       Using a matchgroup in a ":syn region", which is the same syntax
            group as the region, didn't stop a contained item from matching in
            the start pattern.
解决方案:   Also push an item on the stack when the syntax ID of the
            matchgroup is the same as the syntax ID of the region.
相关文件:   src/syntax.c

Patch 5.5.072 (extra)
问题:       Dos 32 bit: When setting <a href="options.html#'columns'">'columns'</a> to a too large value, Vim may
            crash, and the DOS console too.
解决方案:   Check that the value of <a href="options.html#'columns'">'columns'</a> isn't larger than the number of
            columns that the BIOS reports.
相关文件:   src/os_msdos.c, src/proto/os_msdos.pro, src/option.c

Patch 5.5.073 (extra)
问题:       Win 32 GUI: The Find and Find/Replace dialogs didn't show the
            "match case" checkbox.  The Find/Replace dialog didn't handle the
            "match whole word" checkbox.
解决方案:   Support the "match case" and "match whole word" checkboxes.
相关文件:   src/gui_w32.c

Patch 5.6a.001
问题:       Using <code class="special">&lt;C-End&gt;</code> with a count doesn't work like it does with "G".
            (Benji Fisher)
解决方案:   Accept a count for <code class="special">&lt;C-End&gt;</code> and <code class="special">&lt;C-Home&gt;</code>.
相关文件:   src/normal.c

Patch 5.6a.002
问题:       The script for conversion to HTML was an older version.
解决方案:   Add support for running 2html.vim on a color terminal.
相关文件:   runtime/syntax/2html.vim

Patch 5.6a.003
问题:       Defining a function inside a function didn't give an error
            message.  A missing ":endfunction" doesn't give an error message.
解决方案:   Allow defining a function inside a function.
相关文件:   src/eval.c, runtime/doc/eval.txt

Patch 5.6a.004
问题:       A missing ":endwhile" or ":endif" doesn't give an error message.
            (Johannes Zellner)
解决方案:   Check for missing ":endwhile" and ":endif" in sourced files.
            Add missing ":endif" in file selection macros.
相关文件:   src/ex_docmd.c, runtime/macros/file_select.vim

Patch 5.6a.005
问题:       <a href="options.html#'hlsearch'">'hlsearch'</a> was not listed alphabetically.  The value of <a href="options.html#'toolbar'">'toolbar'</a>
            was changed when <a href="options.html#'compatible'">'compatible'</a> is set.
解决方案:   Moved entry of <a href="options.html#'hlsearch'">'hlsearch'</a> in options[] table down.
            Don't reset <a href="options.html#'toolbar'">'toolbar'</a> option to the default value when
            <a href="options.html#'compatible'">'compatible'</a> is set.
相关文件:   src/option.c

Patch 5.6a.006
问题:       Using a backwards range inside ":if 0" gave an error message.
解决方案:   Don't complain about a range when it is not going to be used.
            (Stefan Roemer)
相关文件:   src/ex_docmd.c

Patch 5.6a.007
问题:       ":let" didn't show internal Vim variables.  (Ron Aaron)
解决方案:   Do show ":v" variables for ":let" and ":let v:name".
相关文件:   src/eval.c

Patch 5.6a.008
问题:       Selecting a syntax from the Syntax menu gives an error message.
解决方案:   Replace "else if" in SetSyn() with "elseif".  (Ronald Schild)
相关文件:   runtime/menu.vim

Patch 5.6a.009
问题:       When compiling with +extra_search but without +syntax, there is a
            compilation error in screen.c. (Axel Kielhorn)
解决方案:   Adjust the #ifdef for declaring and initializing "line" in
            win_line().  Also solve compilation problem when +statusline is
            used without +eval.  Another one when +cmdline_compl is used
            without +eval.
相关文件:   src/screen.c, src/misc2.c

Patch 5.6a.010
问题:       In a function, ":startinsert!" does not append to the end of the
            line if a ":normal" command was used to move the cursor. (Fisher)
解决方案:   Reset "w_set_curswant" to avoid that w_curswant is changed again.
相关文件:   src/ex_docmd.c

Patch 5.6a.011 (depends on 5.6a.004)
问题:       A missing ":endif" or ":endwhile" in a function doesn't give an
            error message.
解决方案:   Give that error message.
相关文件:   src/ex_docmd.c

Patch 5.6a.012 (depends on 5.6a.008)
问题:       Some Syntax menu entries caused a hit-enter prompt.
解决方案:   Call a function to make the command shorter.  Also rename a few
            functions to avoid name clashes.
相关文件:   runtime/menu.vim

Patch 5.6a.013
问题:       Command line completion works different when another completion
            was done earlier. (Johannes Zellner)
解决方案:   Reset wim_index when starting a new completion.
相关文件:   src/ex_getln.c

Patch 5.6a.014
问题:       Various warning messages when compiling and running lint with
            different combinations of features.
解决方案:   Fix the warning messages.
相关文件:   src/eval.c, src/ex_cmds.c, src/ex_docmd.c, src/gui_gtk_x11.c,
            src/option.c, src/screen.c, src/search.c, src/syntax.c,
            src/feature.h, src/globals.h

Patch 5.6a.015
问题:       The vimtutor command doesn't always know the value of $VIMRUNTIME.
解决方案:   Let Vim expand $VIMRUNTIME, instead of the shell.
相关文件:   src/vimtutor

Patch 5.6a.016 (extra)
问题:       Mac: Window size is restricted when starting.  Cannot drag the
            window all over the desktop.
解决方案:   Get real screen size instead of assuming 640x400.  Do not use a
            fixed number for the drag limits. (Axel Kielhorn)
相关文件:   src/gui_mac.c

Patch 5.6a.017
问题:       The "Paste" entry in popup menu for Visual, Insert and Cmdline
            mode is in the wrong position. (Stol)
解决方案:   Add priority numbers for all Paste menu entries.
相关文件:   runtime/menu.vim

Patch 5.6a.018
问题:       GTK GUI: submenu priority doesn't work.
            Help dialog could be destroyed too soon.
            When closing a dialog window (e.g. the "ATTENTION" one), Vim would
            just hang.
            When GTK theme is changed, Vim doesn't adjust to the new colors.
            Argument for ":promptfind" isn't used.
解决方案:   Fixed the mentioned problems.
            Made the dialogs look&amp;feel nicer.
            Moved functions to avoid the need for a forward declaration.
            Fixed reentrancy of the file browser dialog.
            Added drag&amp;drop support for GNOME.
            Init the text for the Find/replace dialog from the last used
            search string.  Set "match whole word" toggle button correctly.
            Made repeat rate for drag outside of window depend on the
            distance from the window.  (Marcin Dalecki)
            Made the drag in Visual mode actually work.
            Removed recursiveness protection from gui_mch_get_rgb(), it might
            cause more trouble than it solves.
相关文件:   src/ex_docmd.c, src/gui_gtk.c, src/gui_gtk_x11.c, src/ui.c,
            src/proto/ui.pro, src/misc2.c

Patch 5.6a.019
问题:       When trying to recover through NFS, which uses a large block size,
            Vim might think the swap file is empty, because mf_blocknr_max is
            zero.  (Scott McDermott)
解决方案:   When computing the number of blocks of the file in mf_open(),
            round up instead of down.
相关文件:   src/memfile.c

Patch 5.6a.020
问题:       GUI GTK: Could not set display for gvim.
解决方案:   Add "-display" and "--display" arguments. (Marcin Dalecki)
相关文件:   src/gui_gtk_x11.c

Patch 5.6a.021
问题:       Recovering still may not work when the block size of the device
            where the swap file is located is larger than 4096.
解决方案:   Read block 0 with the minimal block size.
相关文件:   src/memline.c, src/memfile.c, src/vim.h

Patch 5.6a.022 (extra)
问题:       Win32 GUI: When an error in the vimrc causes a dialog to pop up
            (e.g., for an existing swap file), Vim crashes. (David Elins)
解决方案:   Before showing a dialog, open the main window.
相关文件:   src/gui_w32.c

Patch 5.6a.023
问题:       Using expand("%:gs??/?") causes a crash. (Ron Aaron)
解决方案:   Check for running into the end of the string in do_string_sub().
相关文件:   src/eval.c

Patch 5.6a.024
问题:       Using an autocommand to delete a buffer when leaving it can cause
            a crash when jumping to a tag. (Franz Gorkotte)
解决方案:   In do_tag(), store tagstacklen before jumping to another buffer.
            Check tagstackidx after jumping to another buffer.
            Add extra check in win_split() if tagname isn't NULL.
相关文件:   src/tag.c, src/window.c

Patch 5.6a.025 (extra)
问题:       Win32 GUI: The tables for toupper() and tolower() are initialized
            too late. (Mike Steed)
解决方案:   Move the initialization to win32_init() and call it from main().
相关文件:   src/main.c, src/os_w32.c, src/proto/os_w32.pro

Patch 5.6a.026
问题:       When the SNiFF connection is open, shell commands hang. (Pruemmer)
解决方案:   Skip a second wait() call if waitpid() already detected that the
            child has exited.
相关文件:   src/os_unix.c

Patch 5.6a.027 (extra)
问题:       Win32 GUI: The "Edit with Vim" popup menu entry causes problems
            for the Office toolbar.
解决方案:   Use a shell extension dll. (Tianmiao Hu)
            Added it to the install and uninstal programs, replaces the old
            "Edit with Vim" menu registry entries.
相关文件:   src/dosinst.c, src/uninstal.c, gvimext/*, runtime/doc/gui_w32.txt

Patch 5.6a.028 (extra)
问题:       Win32 GUI: Dialogs and tear-off menus can't handle multibyte
            characters.
解决方案:   Adjust nCopyAnsiToWideChar() to handle multibyte characters
            correctly.
相关文件:   src/gui_w32.c

</section><hr class="doubleline" /><section class=inner>
<h4>5.7 版 本                                               <b class="vimtag"> <a name="version-5.7">version-5.7</a> </b></h4>
5.7 版本是 5.6 的漏洞修正版。

改动                                                    <b class="vimtag"> <a name="changed-5.7">changed-5.7</a> </b>
</section><hr class="singleline" /><section class=inner>

src/INSTALL.mac 更名为 INSTALL_mac.txt，以避免错认文件类型。同时更名
src/INSTALL.amiga 为 INSTALL_ami.txt。


新增                                                    <b class="vimtag"> <a name="added-5.7">added-5.7</a> </b>
</section><hr class="singleline" /><section class=inner>

新增语法文件:
stp             Stored Procedures (Jeff Lanzarotta)
snnsnet、snnspat、snnsres       SNNS (Davide Alberani)
mel             MEL (Robert Minsk)
ruby            Ruby (Mirko Nasato)
tli             TealInfo (Kurt W. Andrews)
ora             Oracle config file (Sandor Kopanyi)
abaqus          Abaqus (Carl Osterwisch)
jproperties     Java Properties (Simon Baldwin)
apache          Apache config (Allan Kelly)
csp             CSP (Jan Bredereke)
samba           Samba config (Rafael Garcia-Suarez)
kscript         KDE script (Thomas Capricelli)
hb              Hyper Builder (Alejandro Forero Cuervo)
fortran         Fortran (rewritten) (Ajit J. Thakkar)
sml             SML (Fabrizio Zeno Cornelli)
cvs             CVS commit (Matt Dunford)
aspperl         ASP Perl (Aaron Hope)
bc              BC calculator (Vladimir Scholtz)
latte           Latte (Nick Moffitt)
wml             WML (Gerfried Fuchs)

加入 Exuberant ctags 3.5.1。(Darren Hiebert)

语法项目的 "display" 和 "fold" 参数，为了将来扩展用。现在忽略它们。

Macintosh 的 strftime() 函数。

macros/explorer.vim: 文件浏览器脚本 (M A Aziz Ahmed)


修正                                                    <b class="vimtag"> <a name="fixed-5.7">fixed-5.7</a> </b>
</section><hr class="singleline" /><section class=inner>

The 16 bit MS-DOS version is now compiled with Bcc 3.1 instead of 4.0.  The
executable is smaller.

When a "make test" failed, the output file was lost.  Rename it to
test99.failed to be able to see what went wrong.

After sourcing bugreport.vim, it's not clear that bugreport.txt has been
written in the current directory.  Edit bugreport.txt to avoid that.

Adding IME support when using Makefile.w32 didn't work. (Taro Muraoka)

Win32 console: Mouse drags were passed on even when the mouse didn't move.

Perl interface: In Buffers(), type of argument to SvPV() was int, should be
STRLEN. (Tony Leneis)

Problem with prototype for index() on AIX 4.3.0.  Added check for _AIX43 in
os_unix.h. (Jake Hamby)

Mappings in mswin.vim could break when some commands are mapped.  Add "nore"
to most mappings to avoid re-mapping.

modify_fname() made a copy of a file name for ":p" when it already was a full
path name, which is a bit slow.

Win32 with Borland C++ 5.5: Pass the path to the compiler on to xxd and ctags,
to avoid depending on $PATH.  Fixed "make clean".

Many fixes to Macintosh specific parts: (mostly by Dany StAmant)
- Only one Help menu.
- No more crash when removing a menu item.
- Support as External Editor for Codewarrior (still some little glitches).
- Popup menu support.
- Fixed crash when pasting after application switch.
- Color from rgb.txt properly displayed.
- <a href="options.html#'isprint'">'isprint'</a> default includes all chars above '~'. (Axel Kielhorn)
- mac_expandpath() was leaking memory.
- Add digraphs table. (Axel Kielhorn)
- Multi-byte support: (Kenichi Asai)
  Switch keyscript when going in/out of Insert mode.
  Draw multibyte character correctly.
  Don't use mblen() but highest bit of char to detect multibyte char.
  Display value of multibyte in statusline (also for other systems).
- mouse button was not initialized properly to MOUSE_LEFT when
  USE_CTRLCLICKMENU not defined.
- With Japanese SJIS characters: Make "w", "b", and "e" work
  properly.  (Kenichi Asai)
- Replaced old CodeWarrior file os_mac.CW9.hqx with os_mac.cw5.sit.hqx.

Fixes for VMS: (Zoltan Arpadffy) (also see patch 5.6.045 below)
- Added Makefile_vms.mms and vimrc.vms to src/testdir to be able to run the
  tests.
- Various fixes.
- Set <a href="options.html#'undolevels'">'undolevels'</a> to 1000 by default.
- Made mch_settitle() equivalent to the one in os_unix.c.

RiscOS: A few prototypes for os_riscos.c were outdated.  Generate prototypes
automatically.


预发布补丁:

Patch 5.6.001
问题:       When using "set bs=0 si cin", Inserting "#<code class="special">&lt;BS&gt;</code>" or "}<code class="special">&lt;BS&gt;</code>" which
            reduces the indent doesn't delete the "#" or "}". (Lorton)
解决方案:   Adjust ai_col in ins_try_si().
相关文件:   src/edit.c

Patch 5.6.002
问题:       When using the vim.vim syntax file, a comment with all uppercase
            characters causes a hang.
解决方案:   Adjust pattern for vimCommentTitle (Charles Campbell)
相关文件:   runtime/syntax/vim.vim

Patch 5.6.003
问题:       GTK GUI: Loading a user defined toolbar bitmap gives a warning
            about the colormap.  Probably because the window has not been
            opened yet.
解决方案:   Use gdk_pixmap_colormap_create_from_xpm() to convert the xpm file.
            (Keith Radebaugh)
相关文件:   src/gui_gtk.c

Patch 5.6.004 (extra)
问题:       Win32 GUI with IME: When setting <a href="options.html#'guifont'">'guifont'</a> to "*", the font
            requester appears twice.
解决方案:   In gui_mch_init_font() don't call get_logfont() but copy
            norm_logfont from fh. (Yasuhiro Matsumoto)
相关文件:   src/gui_w32.c

Patch 5.6.005
问题:       When <a href="options.html#'winminheight'">'winminheight'</a> is zero, <code class="keystroke">CTRL-W</code> - with a big number causes a
            crash.  (David Kotchan)
解决方案:   Check for negative window height in win_setheight().
相关文件:   src/window.c

Patch 5.6.006
问题:       GTK GUI: Bold font cannot always be used.  Memory is freed too
            early in gui_mch_init_font().
解决方案:   Move call to g_free() to after where sdup is used. (Artem Hodyush)
相关文件:   src/gui_gtk_x11.c

Patch 5.6.007 (extra)
问题:       Win32 IME: Font is not changed when screen font is changed. And
            IME composition window does not trace the cursor.
解决方案:   Initialize IME font.  When cursor is moved, set IME composition
            window with ImeSetCompositionWindow().  Add call to
            ImmReleaseContext() in several places. (Taro Muraoka)
相关文件:   src/gui.c, src/gui_w32.c, src/proto/gui_w32.pro

Patch 5.6.008 (extra)
问题:       Win32: When two files exist with the same name but different case
            (through NFS or Samba), fixing the file name case could cause the
            wrong one to be edited.
解决方案:   Prefer a perfect match above a match while ignoring case in
            fname_case().  (Flemming Madsen)
相关文件:   src/os_win32.c

Patch 5.6.009 (extra)
问题:       Win32 GUI: Garbage in Windows Explorer help line when selecting
            "Edit with Vim" popup menu entry.
解决方案:   Only return the help line when called with the GCS_HELPTEXT flag.
            (Tianmiao Hu)
相关文件:   GvimExt/gvimext.cpp

Patch 5.6.010
问题:       A file name which contains a TAB was not read correctly from the
            viminfo file and the ":ls" listing was not aligned properly.
解决方案:   Parse the buffer list lines in the viminfo file from the end
            backwards.  Count a Tab for two characters to align the ":ls" list.
相关文件:   src/buffer.c

Patch 5.6.011
问题:       When <a href="options.html#'columns'">'columns'</a> is huge (using a tiny font) and <a href="options.html#'statusline'">'statusline'</a> is
            used, Vim can crash.
解决方案:   Limit maxlen to MAXPATHL in win_redr_custom(). (John Mullin)
相关文件:   src/screen.c

Patch 5.6.012
问题:       When using "zsh" for /bin/sh, toolcheck may hang until "exit" is
            typed. (Kuratczyk)
解决方案:   Add "-c exit" when checking for the shell version.
相关文件:   src/toolcheck

Patch 5.6.013
问题:       Multibyte char in tooltip is broken.
解决方案:   Consider multibyte char in replace_termcodes(). (Taro Muraoka)
Files:      src/term.c

Patch 5.6.014
问题:       When cursor is at the end of line and the character under cursor
            is a multibyte character, "yl" doesn't yank 1 multibyte-char.
            (Takuhiro Nishioka)
解决方案:   Recognize a multibyte-char at end-of-line correctly in oneright().
            (Taro Muraoka)
            Also: make "+quickfix" in ":version" output appear alphabetically.
相关文件:   src/edit.c

Patch 5.6.015
问题:       New xterm delete key sends <code class="special">&lt;Esc&gt;</code>[3~ by default.
解决方案:   Added <code class="special">&lt;kDel&gt;</code> and <code class="special">&lt;kIns&gt;</code> to make the set of keypad keys complete.
相关文件:   src/edit.c, src/ex_getln.c, src/keymap.h, src/misc1.c,
            src/misc2.c, src/normal.c, src/os_unix.c, src/term.c

Patch 5.6.016
问题:       When deleting a search string from history from inside a mapping,
            another entry is deleted too. (Benji Fisher)
解决方案:   Reset last_maptick when deleting the last entry of the search
            history.  Also: Increment maptick when starting a mapping from
            typed characters to avoid a just added search string being
            overwritten or removed from history.
相关文件:   src/ex_getln.c, src/getchar.c

Patch 5.6.017
问题:       ":s/e/\^M/" should replace an "e" with a <code class="keystroke">CTRL-M</code>, not split the
            line. (Calder)
解决方案:   Replace the backslash with a <code class="keystroke">CTRL-V</code> internally. (Stephen P. Wall)
相关文件:   src/ex_cmds.c

Patch 5.6.018
问题:       ":help [:digit:]" takes a long time to jump to the wrong place.
解决方案:   Insert a backslash to avoid the special meaning of '[]'.
相关文件:   src/ex_cmds.c

Patch 5.6.019
问题:       "snd.c", "snd.java", etc. were recognized as "mail" filetype.
解决方案:   Make pattern for mail filetype more strict.
相关文件:   runtime/filetype.vim

Patch 5.6.020 (extra)
问题:       The DJGPP version eats processor time (Walter Briscoe).
解决方案:   Call __dpmi_yield() in the busy-wait loop.
相关文件:   src/os_msdos.c

Patch 5.6.021
问题:       When <a href="options.html#'selection'">'selection'</a> is "exclusive", a double mouse click in Insert
            mode doesn't select last char in line. (Lutz)
解决方案:   Allow leaving the cursor on the NUL past the line in this case.
相关文件:   src/edit.c

Patch 5.6.022
问题:       ":e \~<code class="special">&lt;Tab&gt;</code>" expands to ":e ~\$ceelen", which doesn't work.
解决方案:   Re-insert the backslash before the '~'.
相关文件:   src/ex_getln.c

Patch 5.6.023 (extra)
问题:       Various warnings for the Ming compiler.
解决方案:   Changes to avoid the warnings. (Bill McCarthy)
相关文件:   src/ex_cmds.c, src/gui_w32.c, src/os_w32exe.c, src/os_win32.c,
            src/syntax.c, src/vim.rc

Patch 5.6.024 (extra)
问题:       Win32 console: Entering <code class="keystroke">CTRL-_</code> requires the shift key. (Kotchan)
解决方案:   Specifically catch keycode 0xBD, like the GUI.
相关文件:   src/os_win32.c

Patch 5.6.025
问题:       GTK GUI: Starting the GUI could be interrupted by a SIGWINCH.
            (Nils Lohner)
解决方案:   Repeat the read() call to get the gui_in_use value when
            interrupted by a signal.
相关文件:   src/gui.c

Patch 5.6.026 (extra)
问题:       Win32 GUI: Toolbar bitmaps are searched for in
            $VIMRUNTIME/bitmaps, while GTK looks in $VIM/bitmaps. (Keith
            Radebaugh)
解决方案:   Use $VIM/bitmaps for both, because these are not part of the
            distribution but defined by the user.
相关文件:   src/gui_w32.c, runtime/doc/gui.txt

Patch 5.6.027
问题:       TCL: Crash when using a Tcl script (reported for Win32).
解决方案:   Call Tcl_FindExecutable() in main(). (Brent Fulgham)
相关文件:   src/main.c

Patch 5.6.028
问题:       Xterm patch level 126 sends codes for mouse scroll wheel.
            Fully works with xterm patch level 131.
解决方案:   Recognize the codes for button 4 (0x60) and button 5 (0x61).
相关文件:   src/term.c

Patch 5.6.029
问题:       GTK GUI: Shortcut keys cannot be used for a dialog. (Johannes
            Zellner)
解决方案:   Add support for shortcut keys. (Marcin Dalecki)
相关文件:   src/gui_gtk.c

Patch 5.6.030
问题:       When closing a window and <a href="options.html#'ea'">'ea'</a> is set, Vim can crash. (Yasuhiro
            Matsumoto)
解决方案:   Set "curbuf" to a valid value in win_close().
相关文件:   src/window.c

Patch 5.6.031
问题:       Multi-byte: When a double-byte character ends in CSI, Vim waits
            for another character to be typed.
解决方案:   Recognize the CSI as the second byte of a character and don't wait
            for another one. (Yasuhiro Matsumoto)
相关文件:   src/getchar.c

Patch 5.6.032
问题:       Functions with an argument that is a line number don't all accept
            ".", "$", etc. (Ralf Arens)
解决方案:   Add get_art_lnum() and use it for setline(), line2byte() and
            synID().
相关文件:   src/eval.c

Patch 5.6.033
问题:       Multi-byte: "f " sometimes skips to the second space.  (Sung-Hyun
            Nam)
解决方案:   Change logic in searchc() to skip trailing byte of a double-byte
            character.
            Also: Ask for second byte when searching for double-byte
            character. (Park Chong-Dae)
相关文件:   src/search.c

Patch 5.6.034 (extra)
问题:       Compiling with Borland C++ 5.5 fails on tolower() and toupper().
解决方案:   Use TO_LOWER() and TO_UPPER() instead.  Also adjust the Makefile
            to make using bcc 5.5 easier.
相关文件:   src/edit.c, src/ex_docmd.c, src/misc1.c, src/Makefile.bor

Patch 5.6.035
问题:       Listing the"+comments" feature in the ":version" output depended
            on the wrong ID. (Stephen P. Wall)
解决方案:   Change "CRYPTV" to "COMMENTS".
相关文件:   src/version.c

Patch 5.6.036
问题:       GTK GUI: Copy/paste text doesn't work between gvim and Eterm.
解决方案:   Support TEXT and COMPOUND_TEXT selection targets. (ChiDeok Hwang)
相关文件:   src/gui_gtk_x11.c

Patch 5.6.037
问题:       Multi-byte: Can't use "f" command with multibyte character in GUI.
解决方案:   Enable XIM in Normal mode for the GUI. (Sung-Hyun Nam)
相关文件:   src/gui_gtk_x11.c, src/multbyte.c

Patch 5.6.038
问题:       Multi-clicks in GUI are interpreted as a mouse wheel click.  When
            <a href="options.html#'ttymouse'">'ttymouse'</a> is "xterm" a mouse click is interpreted as a mouse
            wheel click.
解决方案:   Don't recognize the mouse wheel in check_termcode() in the GUI.
            Use 0x43 for a mouse drag in do_xterm_trace(), not 0x63.
相关文件:   src/term.c, src/os_unix.c

Patch 5.6.039
问题:       Motif GUI under KDE: When trying to logout, Vim hangs up the
            system. (Hermann Rochholz)
解决方案:   When handling the WM_SAVE_YOURSELF event, set the WM_COMMAND
            property of the window to let the session manager know we finished
            saving ourselves.
相关文件:   src/gui_x11.c

Patch 5.6.040
问题:       When using ":s" command, matching the regexp is done twice.
解决方案:   After copying the matched line, adjust the pointers instead of
            finding the match again. (Loic Grenie)  Added vim_regnewptr().
相关文件:   src/ex_cmds.c, src/regexp.c, src/proto/regexp.pro

Patch 5.6.041
问题:       GUI: Athena, Motif and GTK don't give more than 10 dialog buttons.
解决方案:   Remove the limit on the number of buttons.
            Also support the 'v' flag in <a href="options.html#'guioptions'">'guioptions'</a>.
            For GTK: Center the buttons.
相关文件:   src/gui_athena.c, src/gui_gtk.c, src/gui_motif.c

Patch 5.6.042
问题:       When doing "vim -u vimrc" and vimrc contains ":q", the cursor in
            the terminal can remain off.
解决方案:   Call cursor_on() in mch_windexit().
相关文件:   src/os_unix.c

Patch 5.6.043 (extra)
问题:       Win32 GUI: When selecting guifont with the dialog, <a href="options.html#'guifont'">'guifont'</a>
            doesn't include the bold or italic attributes.
解决方案:   Append ":i" and/or ":b" to <a href="options.html#'guifont'">'guifont'</a> in gui_mch_init_font().
相关文件:   src/gui_w32.c

Patch 5.6.044 (extra)
问题:       MS-DOS and Windows: The line that dosinst.exe appends to
            autoexec.bat to set PATH is wrong when Vim is in a directory with
            an embedded space.
解决方案:   Use double quotes for the value when there is an embedded space.
相关文件:   src/dosinst.c

Patch 5.6.045 (extra) (fixed version)
问题:       VMS: Various small problems.
解决方案:   Many small changes. (Zoltan Arpadffy)
            File name modifier ":h" keeps the path separator.
            File name modifier ":e" also removes version.
            Compile with MAX_FEAT by default.
            When checking for autocommands ignore version in file name.
            Be aware of file names being case insensitive.
            Added vt320 builtin termcap.
            Be prepared for an empty default_vim_dir.
相关文件:   runtime/gvimrc_example.vim, runtime/vimrc_example.vim,
            runtime/doc/os_vms.txt, src/eval.c, src/feature.h, src/fileio.c,
            src/gui_motif.c, src/gui_vms_conf.h, src/main.c, src/memline.c,
            src/misc1.c, src/option.c, src/os_vms_conf.h, src/os_vms.c,
            src/os_vms.h, src/os_vms.mms, src/tag.c, src/term.c, src/version.c

Patch 5.6.046
问题:       Systems with backslash in file name: With <a href="options.html#'shellslash'">'shellslash'</a> set, "vim
            */*.c" only uses a slash for the first file name.  (Har'El)
解决方案:   Fix slashes in file name arguments after reading the vimrc file.
相关文件:   src/option.c

Patch 5.6.047
问题:       $CPPFLAGS is not passed on to ctags configure.
解决方案:   Add it. (Walter Briscoe)
相关文件:   src/config.mk.in, src/Makefile

Patch 5.6.048
问题:       <code class="keystroke">CTRL-R</code> in Command-line mode is documented to insert text as typed,
            but inserts text literally.
解决方案:   Make <code class="keystroke">CTRL-R</code> insert text as typed, use <code class="keystroke">CTRL-R</code> <code class="keystroke">CTRL-R</code> to insert
            literally.  This is consistent with Insert mode.  But characters
            that end Command-line mode are inserted literally.
相关文件:   runtime/doc/index.txt, runtime/doc/cmdline.txt, src/ex_getln.c,
            src/ops.c, src/proto/ops.pro

Patch 5.6.049
问题:       Documentation for [!] after ":ijump" is wrong way around. (Benji
            Fisher)
解决方案:   Fix the documentation.  Also improve the code to check for a match
            after a /* */ comment.
相关文件:   runtime/doc/tagsearch.txt, src/search.c

Patch 5.6.050
问题:       Replacing is wrong when replacing a single-byte char with
            double-byte char or the other way around.
解决方案:   Shift the text after the character when it is replaced.
            (Yasuhiro Matsumoto)
相关文件:   src/normal.c, src/misc1.c

Patch 5.6.051
问题:       ":tprev" and ":tnext" don't give an error message when trying to
            go before the first or beyond the last tag. (Robert Webb)
解决方案:   Added error messages.  Also: Delay a second when a file-read
            message is going to overwrite an error message, otherwise it won't
            be seen.
相关文件:   src/fileio.c, src/tag.c

Patch 5.6.052
问题:       Multi-byte: When an Ex command has a '|' or '"' as a second byte,
            it terminates the command.
解决方案:   Skip second byte of multibyte char when checking for '|' and '"'.
            (Asai Kenichi)
相关文件:   src/ex_docmd.c

Patch 5.6.053
问题:       <code class="keystroke">CTRL-]</code> doesn't work on a tag that contains a '|'. (Cesar Crusius)
解决方案:   Escape '|', '"' and '\' in tag names when using <code class="keystroke">CTRL-]</code> and also
            for command-line completion.
相关文件:   src/ex_getln.c, src/normal.c

Patch 5.6.054
问题:       When using ":e" and ":e #" the cursor is put in the first column
            when <a href="options.html#'startofline'">'startofline'</a> is set. (Cordell)
解决方案:   Use the last known column when <a href="options.html#'startofline'">'startofline'</a> is set.
            Also, use ECMD_LAST more often to simplify the code.
相关文件:   src/buffer.c, src/ex_cmds.c, src/ex_docmd.c, src/proto/buffer.pro

Patch 5.6.055
问题:       When <a href="options.html#'statusline'">'statusline'</a> only contains a text without "%" and doesn't fit
            in the window, Vim crashes. (Ron Aaron)
解决方案:   Don't use the pointer for the first item if there is no item.
相关文件:   src/screen.c

Patch 5.6.056 (extra)
问题:       MS-DOS: F11 and F12 don't work when <a href="options.html#'bioskey'">'bioskey'</a> is set.
解决方案:   Use enhanced keyboard functions. (Vince Negri)
            Detect presence of enhanced keyboard and set bioskey_read and
            bioskey_ready.
相关文件:   src/os_msdos.c

Patch 5.6.057 (extra)
问题:       Win32 GUI: Multi-byte characters are wrong in dialogs and tear-off
            menus.
解决方案:   Use system font instead of a fixed font. (Matsumoto, Muraoka)
相关文件:   src/gui_w32.c

Patch 5.6.058
问题:       When the 'a' flag is not in <a href="options.html#'guioptions'">'guioptions'</a>, non-Windows systems
            copy Visually selected text to the clipboard/selection on a yank
            or delete command anyway.  On Windows it isn't done even when the
            'a' flag is included.
解决方案:   Respect the 'a' flag in <a href="options.html#'guioptions'">'guioptions'</a> on all systems.
相关文件:   src/normal.c

Patch 5.6.059 (extra)
问题:       When moving the cursor over italic text and the characters spill
            over to the cell on the right, that spill-over is deleted.
            Noticed in the Win32 GUI, can happen on other systems too.
解决方案:   Redraw italic text starting from a blank, like this is already
            done for bold text. (Vince Negri)
相关文件:   src/gui.c, src/gui.h, src/gui_w32.c

Patch 5.6.060
问题:       Some bold characters spill over to the cell on the left, that
            spill-over can remain sometimes.
解决方案:   Redraw a character when the next character was bold and needs
            redrawing. (Robert Webb)
相关文件:   src/screen.c

Patch 5.6.061
问题:       When xterm sends 8-bit controls, recognizing the version response
            doesn't work.
            When using CSI instead of <code class="special">&lt;Esc&gt;</code>[ for the termcap color codes,
            using 16 colors doesn't work. (Neil Bird)
解决方案:   Also accept CSI in place of <code class="special">&lt;Esc&gt;</code>[ for the version string.
            Also check for CSI when handling colors 8-15 in term_color().
            Use CSI for builtin xterm termcap entries when <a href="options.html#'term'">'term'</a> contains
            "8bit".
相关文件:   runtime/doc/term.txt, src/ex_cmds.c, src/option.c, src/term.c,
            src/os_unix.c, src/proto/option.pro, src/proto/term.pro

Patch 5.6.062
问题:       The documentation says that setting <a href="options.html#'smartindent'">'smartindent'</a> doesn't have an
            effect when <a href="options.html#'cindent'">'cindent'</a> is set, but it does make a difference for
            lines starting with "#". (Neil Bird)
解决方案:   Really ignore <a href="options.html#'smartindent'">'smartindent'</a> when <a href="options.html#'cindent'">'cindent'</a> is set.
相关文件:   src/misc1.c, src/ops.c

Patch 5.6.063
问题:       Using "I" in Visual-block mode doesn't accept a count. (Johannes
            Zellner)
解决方案:   Pass the count on to do_insert() and edit(). (Allan Kelly)
相关文件:   src/normal.c, src/ops.c, src/proto/ops.pro

Patch 5.6.064
问题:       MS-DOS and Win32 console: Mouse doesn't work correctly after
            including patch 5.6.28. (Vince Negri)
解决方案:   Don't check for mouse scroll wheel when the mouse code contains
            the number of clicks.
相关文件:   src/term.c

Patch 5.6.065
问题:       After moving the cursor around in Insert mode, typing a space can
            still trigger an abbreviation. (Benji Fisher)
解决方案:   Don't check for an abbreviation after moving around in Insert mode.
相关文件:   src/edit.c

Patch 5.6.066
问题:       Still a few bold character spill-over remains after patch 60.
解决方案:   Clear character just in front of blanking out rest of the line.
            (Robert Webb)
相关文件:   src/screen.c

Patch 5.6.067
问题:       When a file name contains a NL, the viminfo file is corrupted.
解决方案:   Use viminfo_writestring() to convert the NL to <code class="keystroke">CTRL-V</code> n.
            Also fix the Buffers menu and listing a menu name with a newline.
相关文件:   runtime/menu.vim, src/buffer.c, src/mark.c, src/menu.c

Patch 5.6.068
问题:       Compiling the Perl interface doesn't work with Perl 5.6.0.
            (Bernhard Rosenkraenzer)
解决方案:   Also check xs_apiversion for the version number when prepending
            defines for PL_*.
相关文件:   src/Makefile

Patch 5.6.069
问题:       "go" doesn't always end up at the right character when
            <a href="options.html#'fileformat'">'fileformat'</a> is "dos". (Bruce DeVisser)
解决方案:   Correct computations in ml_find_line_or_offset().
相关文件:   src/memline.

Patch 5.6.070 (depends on 5.6.068)
问题:       Compiling the Perl interface doesn't work with Perl 5.6.0.
            (Bernhard Rosenkraenzer)
解决方案:   Simpler check instead of the one from patch 68.
相关文件:   src/Makefile

Patch 5.6.071
问题:       "A" in Visual block mode on a Tab positions the cursor one char to
            the right. (Michael Haumann)
解决方案:   Correct the column computation in op_insert().
相关文件:   src/ops.c

Patch 5.6.072
问题:       When starting Vim with "vim +startinsert", it enters Insert mode
            only after typing the first command. (Andrew Pimlott)
解决方案:   Insert a dummy command in the stuff buffer.
相关文件:   src/main.c

Patch 5.6.073 (extra) (depends on 5.6.034)
问题:       Win32 GUI: When compiled with Bcc 5.5 menus don't work.
            In dosinst.c toupper() and tolower() give an "internal compiler
            error" for Bcc 5.5.
解决方案:   Define WINVER to 4 to avoid compiling for Windows 2000. (Dan
            Sharp)  Also cleaned up compilation arguments.
            Use our own implementation of toupper() in dosinst.c.  Use
            mytoupper() instead of tolower().
相关文件:   src/Makefile.bor, src/dosinst.c

Patch 5.6.074 (extra)
问题:       Entering CSI directly doesn't always work, because it's recognized
            as the start of a special key.  Mostly a problem with multibyte
            in the GUI.
解决方案:   Use K_CSI for a typed CSI character.  Use <code class="special">&lt;CSI&gt;</code> for a normal CSI,
            <code class="special">&lt;xCSI&gt;</code> for a CSI typed in the GUI.
相关文件:   runtime/doc/intro.txt, src/getchar.c, src/gui_amiga.c,
            src/gui_gtk_x11.c, src/gui_mac.c, src/gui_riscos.c, src/gui_w32.c,
            src/keymap.h, src/misc2.c

Patch 5.6.075
问题:       When using "I" or "A" in Visual block mode while <a href="options.html#'sts'">'sts'</a> is set may
            change spaces to a Tab the inserted text is not correct. (Mike
            Steed)  And some other problems when using "A" to append after the
            end of the line.
解决方案:   Check for change in spaces/tabs after inserting the text.  Append
            spaces to fill the gap between the end-of-line and the right edge
            of the block.
相关文件:   src/ops.c

Patch 5.6.076
问题:       GTK GUI: Mapping <code class="special">&lt;M-Space&gt;</code> doesn't work.
解决方案:   Don't use the "Alt" modifier twice in key_press_event().
相关文件:   src/gui_gtk_x11.c

Patch 5.6.077
问题:       GUI: When interrupting an external program with <code class="keystroke">CTRL-C</code>, gvim might
            crash. (Benjamin Korvemaker)
解决方案:   Avoid using a NULL pointer in ui_inchar_undo().
相关文件:   src/ui.c

Patch 5.6.078
问题:       Locale doesn't always work on FreeBSD. (David O'Brien)
解决方案:   Link with the "xpg4" library when available.
相关文件:   src/configure.in, src/configure

Patch 5.6.079
问题:       Vim could crash when several Tcl interpreters are created and
            destroyed.
解决方案:   handle the "exit" command and nested ":tcl" commands better. (Ingo
            Wilken)
相关文件:   runtime/doc/if_tcl.txt, src/if_tcl.c

Patch 5.6.080
问题:       When jumping to a tag, generating the tags file and jumping to the
            same tag again uses the old search pattern. (Sung-Hyun Nam)
解决方案:   Flush cached tag matches when executing an external command.
相关文件:   src/misc2.c, src/proto/tag.pro, src/tag.c

Patch 5.6.081
问题:       ":syn include" uses a level for the included file, this confuses
            contained items included at the same level.
解决方案:   Use a unique tag for each included file.  Changed sp_syn_inc_lvl
            to sp_syn_inc_tag. (Scott Bigham)
相关文件:   src/syntax.c, src/structs.h

Patch 5.6.082
问题:       When using cscope, Vim can crash.
解决方案:   Initialize tag_fname in find_tags(). (Anton Blanchard)
相关文件:   src/tag.c

Patch 5.6.083 (extra)
问题:       Win32: The visual beep can't be seen. (Eric Roesinger)
解决方案:   Flush the output before waiting with GdiFlush(). (Maurice S. Barnum)
            Also: Allow specifying the delay in t_vb for the GUI.
相关文件:   src/gui.c, src/gui_amiga.c, src/gui_gtk_x11.c, src/gui_mac.c,
            src/gui_riscos.c, src/gui_w32.c, src/gui_x11.c, src/gui_beos.cc,
            src/proto/gui_amiga.pro, src/proto/gui_gtk_x11.pro,
            src/proto/gui_mac.pro, src/proto/gui_riscos.pro,
            src/proto/gui_w32.pro, src/proto/gui_x11.pro,
            src/proto/gui_beos.pro

Patch 5.6.084 (depends on 5.6.074)
问题:       GUI: Entering CSI doesn't always work for Athena and Motif.
解决方案:   Handle typed CSI as <code class="special">&lt;xCSI&gt;</code> (forgot this bit in 5.6.074).
相关文件:   src/gui_x11.c

Patch 5.6.085
问题:       Multi-byte: Using "r" to replace a double-byte char with a
            single-byte char moved the cursor one character. (Matsumoto)
            Also, using a count when replacing a single-byte char with a
            double-byte char didn't work.
解决方案:   Don't use del_char() to delete the second byte.
            Get "ptr" again after calling ins_char().
相关文件:   src/normal.c

Patch 5.6.086 (extra)
问题:       Win32: When using libcall() and the returned value is not a valid
            pointer, Vim crashes.
解决方案:   Use IsBadStringPtr() to check if the pointer is valid.
相关文件:   src/os_win32.c

Patch 5.6.087
问题:       Multi-byte: Commands and messages with multibyte characters are
            displayed wrong.
解决方案:   Detect double-byte characters. (Yasuhiro Matsumoto)
相关文件:   src/ex_getln.c, src/message.c, src/misc2.c, src/screen.c

Patch 5.6.088
问题:       Multi-byte with Motif or Athena: The message "XIM requires
            fontset" is annoying when Vim was compiled with XIM support but it
            is not being used.
解决方案:   Remove that message.
相关文件:   src/multbyte.c

Patch 5.6.089
问题:       On non-Unix systems it's possible to overwrite a read-only file
            without using "!".
解决方案:   Check if the file permissions allow overwriting before moving the
            file to become the backup file.
相关文件:   src/fileio.c

Patch 5.6.090
问题:       When editing a file in "/home/dir/home/dir" this was replaced with
            "~~".  (Andreas Jellinghaus)
解决方案:   Replace the home directory only once in home_replace().
相关文件:   src/misc1.c

Patch 5.6.091
问题:       When editing many "no file" files, can't create swap file, because
            .sw[a-p] have all been used.  (Neil Bird)
解决方案:   Also use ".sv[a-z]", ".su[a-z]", etc.
相关文件:   src/memline.c

Patch 5.6.092
问题:       FreeBSD: When setting $TERM to a non-valid terminal name, Vim
            hangs in tputs().
解决方案:   After tgetent() returns an error code, call it again with the
            terminal name "dumb".  This apparently creates an environment in
            which tputs() doesn't fail.
相关文件:   src/term.c

Patch 5.6.093 (extra)
问题:       Win32 GUI: "ls | gvim -" will show a message box about reading
            stdin when Vim exits. (Donohue)
解决方案:   Don't write a message about the file read from stdin until the GUI
            has started.
相关文件:   src/fileio.c

Patch 5.6.094
问题:       Problem with multibyte string for ":echo var".
解决方案:   Check for length in msg_outtrans_len_attr(). (Sung-Hyun Nam)
            Also make do_echo() aware of multibyte characters.
相关文件:   src/eval.c, src/message.c

Patch 5.6.095
问题:       With an Emacs TAGS file that include another a relative path
            doesn't always work.
解决方案:   Use expand_tag_fname() on the name of the included file.
            (Utz-Uwe Haus)
相关文件:   src/tag.c

Patch 5.6.096
问题:       Unix: When editing many files, startup can be slow. (Paul
            Ackersviller)
解决方案:   Halve the number of stat() calls used to add a file to the buffer
            list.
相关文件:   src/buffer.c

Patch 5.7a.001
问题:       GTK doesn't respond on drag&amp;drop from ROX-Filer.
解决方案:   Add "text/uri-list" target. (Thomas Leonard)
            Also: fix problem with checking for trash arguments.
相关文件:   src/gui_gtk_x11.c

Patch 5.7a.002
问题:       Multi-byte: <a href="options.html#'showmatch'">'showmatch'</a> is performed when second byte of an
            inserted double-byte char is a paren or brace.
解决方案:   Check IsTrailByte() before calling showmatch(). (Taro Muraoka)
相关文件:   src/misc1.c

Patch 5.7a.003
问题:       Multi-byte: After using <code class="keystroke">CTRL-O</code> in Insert mode with the cursor at
            the end of the line on a multibyte character the cursor moves to
            the left.
解决方案:   Check for multibyte character at end-of-line. (Taro Muraoka)
            Also: fix cls() to detect a double-byte character. (Chong-Dae Park)
相关文件:   src/edit.c, src/search.c

Patch 5.7a.004
问题:       When reporting the search pattern offset, the string could be
            unterminated, which may cause a crash.
解决方案:   Terminate the string for the search offset. (Stephen P. Wall)
相关文件:   src/search.c

Patch 5.7a.005
问题:       When ":s//~/" doesn't find a match it reports "[NULL]" for the
            pattern.
解决方案:   Use get_search_pat() to obtain the actually used pattern.
相关文件:   src/ex_cmds.c, src/proto/search.pro, src/search.c

Patch 5.7a.006 (extra)
问题:       VMS: Various problems, also with the VAXC compiler.
解决方案:   In many places use the Unix code for VMS too.
            Added time, date and compiler version to version message.
            (Zoltan Arpadffy)
相关文件:   src/ex_cmds.c, src/ex_docmd.c, src/globals.h, src/gui_vms_conf.h,
            src/main.c, src/message.c, src/misc1.c, src/os_vms.c,
            src/os_vms.h, src/os_vms.mms, src/os_vms_conf.h,
            src/proto/os_vms.pro, src/proto/version.pro, src/term.c,
            src/version.c, src/xxd/os_vms.mms, src/xxd/xxd.c

Patch 5.7a.007
问题:       Motif and Athena GUI: <code class="keystroke">CTRL-@</code> is interpreted as <code class="keystroke">CTRL-C</code>.
解决方案:   Only use "intr_char" when it has been set.
相关文件:   src/gui_x11.c

Patch 5.7a.008
问题:       GTK GUI: When using <code class="keystroke">CTRL-L</code> the screen is redrawn twice, causing
            trouble for bold characters.  Also happens when moving with the
            scrollbar.  Best seen when <a href="options.html#'writedelay'">'writedelay'</a> is non-zero.
            When starting the GUI with ":gui" the screen is redrawn once with
            the wrong colors.
解决方案:   Only set the geometry hints when the window size really changed.
            This avoids setting it each time the scrollbar is forcefully
            redrawn.
            Don't redraw in expose_event() when gui.starting is still set.
相关文件:   src/gui_gtk_x11.c


</section><hr class="doubleline" /><section class=inner>
<h4>5.8 版 本                                               <b class="vimtag"> <a name="version-5.8">version-5.8</a> </b></h4>
5.8 版本是 5.7 的漏洞修正版。


改动                                                    <b class="vimtag"> <a name="changed-5.8">changed-5.8</a> </b>
</section><hr class="singleline" /><section class=inner>

Vim 不再包含 ctags。它已经成为独立的项目。这里可以找到: <a href="http://ctags.sf.net">http://ctags.sf.net</a>。
编写程序时，高度建议和 Vim 一起使用。


新增                                                    <b class="vimtag"> <a name="added-5.8">added-5.8</a> </b>
</section><hr class="singleline" /><section class=inner>

新语法文件:
acedb           AceDB (Stewart Morris)
aflex           Aflex (Mathieu Clabaut)
antlr           Antlr (Mathieu Clabaut)
asm68k          68000 Assembly (Steve Wall)
automake        Automake (John Williams)
ayacc           Ayacc (Mathieu Clabaut)
b               B (Mathieu Clabaut)
bindzone        BIND zone (glory hump)
blank           Blank (Rafal Sulejman)
cfg             Configure 文件 (Igor Prischepoff)
changelog       ChangeLog (Gediminas Paulauskas)
cl              Clever (Phil Uren)
crontab         Crontab (John Hoelzel)
csc             Essbase 脚本 (Raul Segura Acevedo)
cynlib          Cynlib(C++) (Phil Derrick)
cynpp           Cyn++ (Phil Derrick)
debchangelog    Debian Changelog (Wichert Akkerman)
debcontrol      Debian Control (Wichert Akkerman)
dns             DNS 区域文件 (Jehsom)
dtml            Zope 的 DTML (Jean Jordaan)
dylan           Dylan、Dylan-intr 和 Dylan-lid (Brent Fulgham)
ecd             Embedix Component Description (John Beppu)
fgl             Informix 4GL (Rafal Sulejman)
foxpro          FoxPro (Powing Tse)
gsp             GNU Server Pages (Nathaniel Harward)
gtkrc           GTK rc (David Necas)
hercules        Hercules (Avant! Corporation) (Dana Edwards)
htmlos          Aestiva 的 HTML/OS (Jason Rust)
inittab         SysV process control (David Necas)
iss             Inno Setup (Dominique Stephan)
jam             Jam (Ralf Lemke)
jess            Jess (Paul Baleme)
lprolog         LambdaProlog (Markus Mottl)
ia64            Intel Itanium (parth malwankar)
kix             Kixtart (Nigel Gibbs)
mgp             MaGic Point (Gerfried Fuchs)
mason           Mason (带 Perl 的 HTML) (Andrew Smith)
mma             Mathematica (Wolfgang Waltenberger)
nqc             Not Quite C (Stefan Scherer)
omnimark        Omnimark (Paul Terray)
openroad        OpenROAD (Luis Moreno Serrano)
named           BIND configuration (glory hump)
papp            PApp (Marc Lehmann)
pfmain          Postfix main config (Peter Kelemen)
pic             PIC assembly (Aleksandar Veselinovic)
ppwiz           PPWizard (Stefan Schwarzer)
progress        Progress (Phil Uren)
psf             Product Specification File (Rex Barzee)
r               R (Tom Payne)
registry        MS-Windows 注册表 (Dominique Stephan)
robots          Robots.txt (Dominique Stephan)
rtf             Rich Text Format (Dominique Stephan)
setl            SETL (Alex Poylisher)
sgmldecl        SGML Declarations (Daniel A. Molina W.)
sinda           Sinda input (Adrian Nagle)
sindacmp        Sinda compare (Adrian Nagle)
sindaout        Sinda output (Adrian Nagle)
smith           SMITH (Rafal Sulejman)
snobol4         Snobol 4 (Rafal Sulejman)
strace          Strace (David Necas)
tak             TAK input (Adrian Nagle)
takcmp          TAK compare (Adrian Nagle)
takout          TAK output (Adrian Nagle)
tasm            Turbo assembly (FooLman)
texmf           TeX configuration (David Necas)
trasys          Trasys input (Adrian Nagle)
tssgm           TSS Geometry (Adrian Nagle)
tssop           TSS Optics (Adrian Nagle)
tsscl           TSS Command line (Adrian Nagle)
virata          Virata Configuration Script (Manuel M.H. Stol)
vsejcl          VSE JCL (David Ondrejko)
wdiff           Wordwise diff (Gerfried Fuchs)
wsh             Windows Scripting Host (Paul Moore)
xkb             X Keyboard Extension (David Necas)

php3 更名为 php，现在同时支持 php4 (Lutz Eymers)

Patch 5.7.015
问题:       Vim 6.0 的语法文件不能用于 5.x。
解决方案:   ":highlight" 命令加入 "default" 参数: 如果已经指定高亮，忽略命令。
相关文件:   src/syntax.c

用 makemenu.vim 生成 Syntax 菜单，从而不需要在 Vim 启动时完成。减少了 GUI 启动
时间。


修正                                                    <b class="vimtag"> <a name="fixed-5.8">fixed-5.8</a> </b>
</section><hr class="singleline" /><section class=inner>

Conversion of docs to HTML didn't convert " <a href="tagsrch.html#tag">tag</a> s" to a hyperlink.

Fixed compiling under NeXT. (Jeroen C.M. Goudswaard)

optwin.vim gave an error when used in Vi compatible mode (<a href="options.html#'cpo'">'cpo'</a> contains 'C').

Tcl interpreter: "buffer" command didn't check for presence of an argument.
(Dave Bodenstab)

dosinst.c: Added checks for too long file name.

Amiga: a file name starting with a colon was considered absolute but it isn't.
Amiga: ":pwd" added a slash when in the root of a drive.

Macintosh: Warnings for unused variables. (Bernhard Pruemmer)

Unix: When catching a deadly signal, handle it in such a way that it's
unlikely that Vim will hang.  Call _exit() instead of exit() in case of a
severe problem.

Setting the window title from nothing to something didn't work after patch 29.

Check for ownership of .exrc and .vimrc was done with stat().  Use lstat() as
well for extra security.

Win32 GUI: Printing a file with <a href="options.html#'fileformat'">'fileformat'</a> "unix" didn't work.  Set
<a href="options.html#'fileformat'">'fileformat'</a> to "dos" before writing the temp file.

Unix: Could start waiting for a character when checking for a <code class="keystroke">CTRL-C</code> typed
when an X event is received.

Could not use Perl and Python at the same time on FreeBSD, because Perl used
"-lc" and Python used the threaded C library.

Win32: The Mingw compiler gave a few warning messages.

When using "ZZ" and an autocommand for writing uses an abbreviation it didn't
work.  Don't stuff the ":x" command but execute it directly. (Mikael Berthe)

VMS doesn't always have lstat(), added an #ifdef around it.

Added a few corrections for the Macintosh. (Axel Kielhorn)

Win32: GvimExt could not edit more than a few files at once, the length of the
argument was fixed.


Vim 5.7 预发布补丁:

Patch 5.7.001
问题:       When the current buffer is encrypted, and another modified buffer
            isn't, ":wall" will encrypt the other buffer.
解决方案:   In buf_write() use "buf" instead of "curbuf" to check for the
            crypt key.
相关文件:   src/fileio.c

Patch 5.7.002
问题:       When <a href="options.html#'showmode'">'showmode'</a> is set, using "<code class="keystroke">CTRL-O</code> :r file" waits three seconds
            before displaying the read text. (Wichert Akkerman)
解决方案:   Set "keep_msg" to the file message so that the screen is redrawn
            before the three seconds wait for displaying the mode message.
相关文件:   src/fileio.c

Patch 5.7.003
问题:       Searching for "[[:cntrl:]]" doesn't work.
解决方案:   Exclude NUL from the matching characters, it terminates the list.
相关文件:   src/regexp.c

Patch 5.7.004
问题:       GTK: When selecting a new font, Vim can crash.
解决方案:   In gui_mch_init_font() unreference the old font, not the new one.
相关文件:   src/gui_gtk_x11.c

Patch 5.7.005
问题:       Multibyte: Inserting a wrapped line corrupts kterm screen.
            Pasting TEXT/COMPOUND_TEXT into Vim does not work.
            On Motif no XIM status line is displayed even though it is
            available.
解决方案:   Don't use xterm trick for wrapping lines for multibyte mode.
            Correct a missing "break", added TEXT/COMPOUND_TEXT selection
            request.
            Add XIMStatusArea fallback code.
            (Katsuhito Nagano)
相关文件:   src/gui_gtk_x11.c, src/multbyte.c, src/screen.c, src/ui.c

Patch 5.7.006
问题:       GUI: redrawing the non-Visual selection is wrong when the window
            is unobscured. (Jean-Pierre Etienne)
解决方案:   Redraw the selection properly and don't clear it.  Added "len"
            argument to clip_may_redraw_selection().
相关文件:   src/gui.c, src/ui.c, src/proto/ui.pro

Patch 5.7.007
问题:       Python: Crash when using the current buffer twice.
解决方案:   Increase the reference count for buffer and window objects.
            (Johannes Zellner)
相关文件:   src/if_python.c

Patch 5.7.008
问题:       In Ex mode, backspacing over the first TAB doesn't work properly.
            (Wichert Akkerman)
解决方案:   Switch the cursor on before printing the newline.
相关文件:   src/ex_getln.c

Patch 5.7.009 (extra)
问题:       Mac: Crash when using a long file.
解决方案:   Don't redefine malloc() and free(), because it will break using
            realloc().
相关文件:   src/os_mac.h

Patch 5.7.010
问题:       When using <code class="keystroke">CTRL-A</code> on a very long number Vim can crash.  (Michael
            Naumann)
解决方案:   Truncate the length of the new number to avoid a buffer overflow.
相关文件:   src/ops.c

Patch 5.7.011 (extra)
问题:       Win32 GUI on NT 5 and Win98: Displaying Hebrew is reversed.
解决方案:   Output each character separately, to avoid that Windows reverses
            the text for some fonts. (Ron Aaron)
相关文件:   src/gui_w32.c

Patch 5.7.012
问题:       When using "-complete=buffer" for ":command" the user command
            fails.
解决方案:   In a user command don't replace the buffer name with a count for
            the  buffer number.
相关文件:   src/ex_docmd.c

Patch 5.7.013
问题:       "gD" didn't always find a match in the first line, depending on
            the column the search started at.
解决方案:   Reset the column to zero before starting to search.
相关文件:   src/normal.c

Patch 5.7.014
问题:       Rot13 encoding was done on characters with accents, which is
            wrong. (Sven Gottwald)
解决方案:   Only do rot13 encoding on ASCII characters.
相关文件:   src/ops.c

Patch 5.7.016
问题:       When hitting 'n' for a ":s///c" command, the ignore-case flag was
            not restored, some matches were skipped. (Daniel Blaustein)
解决方案:   Restore the reg_ic variable when 'n' was hit.
相关文件:   src/ex_cmds.c

Patch 5.7.017
问题:       When using a Vim script for Vim 6.0 with <code class="special">&lt;SID&gt;</code> before a function
            name, it produces an error message even when inside an "if version
            &gt;= 600".  (Charles Campbell)
解决方案:   Ignore errors in the function name when the function is not going
            to be defined.
相关文件:   src/eval.c

Patch 5.7.018
问题:       When running "rvim" or "vim -Z" it was still possible to execute a
            shell command with system() and backtick-expansion. (Antonios A.
            Kavarnos)
解决方案:   Disallow executing a shell command in get_cmd_output() and
            mch_expand_wildcards().
相关文件:   src/misc1.c, src/os_unix.c

Patch 5.7.019
问题:       Multibyte: In a substitute string, a multibyte character isn't
            skipped properly, can be a problem when the second byte is a
            backslash.
解决方案:   Skip an extra byte for a double-byte character. (Muraoka Taro)
相关文件:   src/ex_cmds.c

Patch 5.7.020
问题:       Compilation doesn't work on MacOS-X.
解决方案:   Add a couple of #ifdefs. (Jamie Curmi)
相关文件:   src/regexp.c, src/ctags/general.h

Patch 5.7.021
问题:       Vim sometimes produces a beep when started in an xterm.  Only
            happens when compiled without mouse support.
解决方案:   Requesting the xterm version results in a K_IGNORE.  This wasn't
            handled when mouse support is disabled.  Accept K_IGNORE always.
相关文件:   src/normal.c

Patch 5.7.022
问题:       %v in <a href="options.html#'statusline'">'statusline'</a> is not displayed when it's equal to %c.
解决方案:   Check if %V or %v is used and handle them differently.
相关文件:   src/screen.c

Patch 5.7.023
问题:       Crash when a WinLeave autocommand deletes the buffer in the other
            window.
解决方案:   Check that after executing the WinLeave autocommands there still
            is a window to be closed.  Also update the test that was supposed
            to check for this problem.
相关文件:   src/window.c, testdir/test13.in, testdir/test13.ok

Patch 5.7.024
问题:       Evaluating an expression for <a href="options.html#'statusline'">'statusline'</a> can have side effects.
解决方案:   Evaluate the expression in a sandbox.
相关文件:   src/edit.c, src/eval.c, src/proto/eval.pro, src/ex_cmds.c,
            src/ex_cmds.h, src/ex_docmd.c, src/globals.h, src/option.c,
            src/screen.c, src/undo.c

Patch 5.7.025 (fixed)
问题:       Creating a temp file has a race condition.
解决方案:   Create a private directory to write the temp files in.
相关文件:   src/fileio.c, src/misc1.c, src/proto/misc1.pro,
            src/proto/fileio.pro, src/memline.c, src/os_unix.h

Patch 5.7.026 (extra)
问题:       Creating a temp file has a race condition.
解决方案:   Create a private directory to write the temp files in.
            This is the extra part of patch 5.7.025.
相关文件:   src/os_msdos.h

Patch 5.7.027
问题:       Starting to edit a file can cause a crash.  For example when in
            Insert mode, using <code class="keystroke">CTRL-O</code> :help abbr<code class="special">&lt;Tab&gt;</code> to scroll the screen and
            then <code class="special">&lt;CR&gt;</code>, which edits a help file. (Robert Bogomip)
解决方案:   Check if keep_msg is NULL before copying it.
相关文件:   src/fileio.c

Patch 5.7.028
问题:       Creating a backup or swap file could fail in rare situations.
解决方案:   Use O_EXCL for open().
相关文件:   src/fileio.c, src/memfile.c

Patch 5.7.029
问题:       Editing a file with an extremely long name crashed Vim.
解决方案:   Check for length of the name when setting the window title.
相关文件:   src/buffer.c

Patch 5.7.030
问题:       A ":make" or ":grep" command with a very long argument could cause
            a crash.
解决方案:   Allocate the buffer for the shell command.
相关文件:   src/ex_docmd.c


 vim:tw=78:ts=8:noet:ft=help:norl:
</section>
</article>
<footer>
Generated by vim2html
</footer>
</body>
</html>
